Main:
Configure my.conf
Log-bin=mysql-bin
Server-id = 1
Binlog-do-db=jinrimingpin_com
Binlog-do-db=jinripinpai_com
Binlog-do-db=jinritemaihui_com
Binlog-do-db=mingpintejia_com
BINLOG-DO-DB is a database that allows synchronization. One line.
Show MASTER STATUS
mysql-bin.000001 4658 The following settings from the library to use the change master to
Then guide the data to the library.
Create a new account that you can access from the library.
Grant replication slave on *.* to "Congku" @ "xxxx" identified by "password";
Flush privileges;
From:
Configure my.conf
Server-id = 2
Replicate-do-db=mingpintejia_com
Slave_skip_errors = 1062,1032
Database to be synchronized from the library replicate-do-db
Mysql-u congku-p-H XX.XX.XX.XX detects whether the primary server can be connected
Slave stop;
Change MASTER to
master_host= ' xxx ', master_user= ' Congku ', master_password= ' password ', master_log_file= ' mysql-bin.000002′,master_log_pos= 102470;
Start slave;
Ensure:
Slave_io_running:yes
Slave_sql_running:yes