1. Create a replication user
' Rep_user ' @'%.192.168.0.106'123456';
2. Permission Grant
' Rep_user ' @'%.192.168.0.106';
3. Back up the main library
C:\users\administrator>mysqldump-uroot--password--databases test01 >e:/temp/20170507/ ****
Show master status;
View the main library status
Stop the main library service
4. Recovering data from a library
C:\temp\mysql-5.7. -winx64\bin>mysql-u root-p <c:/temp/* * * * *
5. Start Copy from library
to set up replication information from a library -. Mysql>Change MASTER to -. master_host='Master_host_name', +. Master_user='Replication_user_name', -. master_password='Replication_password', +. master_log_file='Recorded_log_file_name', A. master_log_pos=recorded_log_position start SLAVE from the library thread ;
Use the following command to view the copy status from library show slave status;
MySQL 5.7 master and slave library replication settings