How the MySQL synchronization tool uses

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.