Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
First, install MySQL, set up the required database, stop all MySQL server.
Second, please add the following six lines to each need to sync MySQL my.ini file, where backup_db fill in your real need to sync the database, Server-id on behalf of the server number, the number of each server can not be the same to 1,2,3 ... :
Server-id=1 #服务器编号.
Log-bin=c:\mysqlback #同步事件的日志记录文件名.
binlog-do-db=backup_db #提供数据同步服务的数据库, multiple databases are separated by commas, and end with commas.
Log-slave-updates
Log-warnings
Skip-name-resolve
Third, if the newly established empty database can ignore this step, if the database has been used and have data, please perform this step: (Manually copy the primary server database to all the secondary server overlay backuk_db, can also directly compress the MySQL data directory under the Backup_ DB directory, and then update to the secondary server. To ensure that the initial database state is exactly the same. )
Four, open the MySQLSync.exe program, each MySQL server add a record, their root account password added.
Five, start all MySQL server.
Six, click to Start Monitoring the button to see if you can link all the MySQL server.
Seven, go to Automatic Settings window, according to their own needs to set the MySQL synchronization mode.
Eight, return to the monitoring window to see if the synchronization is normal.
General slave Monitor Normal when IO description shows "Waiting for ...", there is "Q ..." when writing data and the last error message there is no error message displayed.
Nine, the mysqlsync_agent test to each of the MySQL server, run the installation Services. BAT, will install a mysqlsync_agent service.
X. Configure Mysqlsync_agent\config.ini files. Set the basic parameters of the mysqlsync_agent and restart the Mysqlsync_agent service after Setup:
Server:mysql Server
User:mysql username
Password:mysql Password
Port:mysql Port number
Agentport: Managed-side work port number
BACKUP_DB: Database name to be backed up
Backup_time: Backup interval (in seconds)
Backup_path: Backup relative path
Backup_delete: How many days ago to delete backup files