Many online configuration tutorials, I also refer to other people's tutorial completed, mainly encountered the following several issues, if someone later met the same hope to write a hint to you.
1.MY.CNF file Configuration
The server_id configured in my.cnf on Master must be different from the server_id configuration in my.cnf on Slove
2.Master Create a data synchronization user and grant the appropriate permissions
mysql> Grant Replication Replication on *. * to ' Root '@'192.168.181.13'by'* * * * * *
Where ' root ' is the user name (assigned by master) required for slave to get the data on master, ' 192.168.181.23 ' is the IP of slave, ' * * * * * * This is the password required for slave to get the master data.
3.Slave Synchronous Writing code
Mysql>Change Master toMaster_host='192.168.181.23', Master_user='Root', Master_password='*****', Master_port=3306, Master_log_file='edu-mysql-bin.000001', Master_log_pos=2194 , Master_connect_retry= -;
Master_user is allocated in the 2 Mster, here I want to talk about is Master_log_pos, this value is the master state in the corresponding position. The master_log_file corresponds to the file
MySQL> show Master Status;
If not, the Slave_io_running:no will not change in Slave even if start Slave but Slave state.
Some problems with MySQL master-slave replication configuration