Make sure the primary database is the same as the data from the database
"Master server" color 38 platform Repair (Enterprise e: 217 1793 408)
1. Create an account for backup from the server and only need to grant replication slave permissions.
mysql> CREATE USER ' forslave ' @ '% ' identified by ' 123456 ';
Mysql> GRANT REPLICATION SLAVE on . To ' forslave ' ('% ');
You can also create directly using phpMyAdmin
Can not map all IP, only intranet-related servers
There may be 3306 firewall ports that need to be opened
2. Configure MY.CNF as follows
[Mysqld]
Server-id=1
Log-bin=mysql-bin#binlog Name
#binlog-do-db=mstest//MSTest database to be synchronized, to synchronize multiple databases, add several replicate-db-db= database names #binlog-ignore-db=mysql//database to ignore
3 Restarting the database
View Primary Server Status
Mysql> Show master status;
Log file name and position value, which are later configured to be used from the server
Centos Mysql Master-Slave synchronization build and color 38 platform repair