1
database 討論版 / 請問Mysql同步問題
« 於: 2012-10-19 11:42 »
請問各位前輩, Mysql怎樣做到同一台機器即時同步的方法?就是A資料庫同步到B資料庫
我之前是有做過master/slave的, 但同一台機器的就不知道怎麼做?
謝謝各位
我之前是有做過master/slave的, 但同一台機器的就不知道怎麼做?
謝謝各位
這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。
<?php
header("Content-type: text/html; charset=big5");
header("Content-disposition: filename=1.xls");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
?>
<table>
<tr>
<td>1</td>
<td><?="(<1/3學期)協同教學";?></td>
</tr>
<tr>
<td>2</td>
<td><?="<1/3學期";?></td>
</tr>
<tr>
<td>3</td>
<td><?="1/3學期";?></td>
</tr>
<tr>
<td>4</td>
<td><?="<13學期";?></td>
</tr>
<tr>
<td>5</td>
<td><?="哈<ddd";?></td>
</tr>
</table>
NameVirtualHost xxx.xxx.xxx.xxx
<Directory "/var/www/html/a">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost www.xxxxx.com.tw>
ServerName www.xxxxx.com.tw
DocumentRoot /var/www/html/a
</VirtualHost>
<Directory "/var/www/html/b">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost b.xxxxx.com.tw>
ServerName b.xxxxx.com.tw
DocumentRoot /var/www/html/b
</VirtualHost>
<Directory "/var/www/html/c">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost c.xxxxx.com.tw>
ServerName c.xxxxx.com.tw
DocumentRoot /var/www/html/c
</VirtualHost>
try
{
$soap = new SoapClient("http://xxx.xxx.xxx.xxx/aa.asmx?WSDL");
$result = $soap->Hellow();
echo $result->HellowResult;
}
catch(Exception $e)
{
echo 'Caught exception: ', $e->getMessage(), "\n";
}
header("Content-Type: application/vnd.ms-excel;charset=UTF-8");
$Mail = new PHPMailer();
$Mail->IsSMTP();
$Mail->Host = 'xxx.xxx.xxx.xxx';
$Mail->Port = '25';
$Mail->SMTPAuth = false;
$Mail->Username = 'username';
$Mail->Password = 'password';
$Mail->From = $from;
$Mail->FromName = "CHICHI";
$Mail->CharSet = "utf-8";
$Mail->Encoding = "base64";
$Mail->IsHTML(true);
$Mail->WordWrap = 50;
$Mail->AddAddress('chi@yahoo.com.tw','chi');
$Mail->Subject = 'test';
$Mail->Body = 'test';
$Mail->Send();
$Mail->SMTPDebug=true;
來看訊息,顯示如下:編號 | 姓名 | 學號 | 備註 | 日期 |
1 | 張三 | 990001 | 現在肚 | |
子餓了 | 2010/06/02 | |||
2 | 李四 | 990002 | 今天禮拜三 | 2010/06/02 |