1, add in master server My.ini:
Server-id=1//A unique identifier for the database service, usually set the end number of the server IP
Log-bin=master-bin
Log-bin-index=master-bin.index
2, start the primary server;
3, perform the show master status, and view the state of the primary server;
4, copy the database contents of the current master server;
5, create the master server database from the server;
6, add from server My.ini:
server-id=2
Relay-log-index=slave-relay-bin.index
Relay-log=slave-relay-bin
7, start from the server;
8, executing from the service:
Change Master to master_host= ' 127.0.0.1 ',//master server IP
master_port=3306,
Master_user= ' Root ',
Master_password= ' admin ',
Master_log_file= ' master-bin.000001 ',//master server-generated logs
master_log_pos=0;
9, start from service: Start slave;
10, add a piece of data to the master server to see if the synchronization is successful from the server;
MySQL Configuration master-Slave