First make sure that there are more than two MySQL servers to view the server IP address Windows under the Command window input ipconfig linux input ifconfig determine the address of two servers and ping each other to see if you can ping through ( May need to shut down Windows and Linux firewalls)
down to make sure that the server is acting as the primary server edit the MySQL profile on the primary server under Windows My.ini Linux for my.cnfOpen the binary log under [mysqld] on the primary server Log_bin set the value of server_id server_id only to ensure that the integer is not repeated on the line is generally configured for the IP address restart the login master server MySQL
Add a user with copy permissions grant replication slave on * * to ' root ' @ ' 192.168.80.% ' identified by ' 123456 '; flush privileges under flush;
Enter show master status and then enter
Do not close the window
Open from server settings server_id here do not need to turn on binary log setup well after restarting MySQL service log on from server MySQL
Settings from there to start copying
1Change Master toMaster_host='192.168.93.1', Master_port=3306, Master_user='Root', Master_password='123456', Master_log_file='desktop-16im3fa-bin.000176', Master_log_pos=405;
The values for Msater_log_file and master_log_pos here are the values in the master state of the primary server initiating replication
1 start slave
(If you modify the replication source, you need stop slave to stop replication first) to detect from the server state on the Execute command from the server, show slave status confirmation
1 show slave status;
See if IO SQL two threads are double YES if you are not looking at the following error Last_error tips for debugging
If it's double yes then the configuration is successful. Let's test it. Create a database in the master server MySQL to add a bit of data to see if there are any from the server
MySQL Master-slave replication