Step 1:
Suppose 192.168.20.52 is the main library. 192.168.20.53 is the main library.
Variable section 192.168.20 account name based on your IP settings, p4ssword password repl
Where is it executed? Login MySQL Execution
GRANT REPLICATION slave,reload,super On * * to [e-mail protected] ' 192.168.20.% ' identified by ' P4ssword ';
Step 2
Vim/etc/my.cnf
Add the following configuration
Log_bin=mysql-bin
server_id=10
Step 3:
Modify from library configuration
Vim/etc/my.cnf
Log_bin=mysql-bin
server_id=2
Relay_log=/var/lib/mysql/mysql-relay-bin
Log_slave_updates=1
Step 3:
Change Master to master_host= ' 192.168.20.52 ', master_user= ' repl ', master_password= ' P4ssword ',
Master_log_file= ' mysql-bin.000001 ', master_log_pos=0;
Execute from library, view status
Show Slave Status\g
Start Replication from library
Start slave;
OK now in the main library, create a test test table, you will find in from the library, there will also be created tables and inserted data
If it is a newly installed MySQL, follow the steps above and there will be no problem with the
Before I met a slave_io_running, why did you do it for a few days?
After reloading the MySQL, now finally can.
Install MySQL configuration master-slave synchronization under CentOS