Copy from library main steps : ==================== you can see that there is a time lock table when copying from the main library, which affects the use of the main library. If we can replicate directly from the library, it will not have an impact on the main library. However, copying from the library ensures that the data from the library is not changed during the copy process, so you must first stop the library from being removed. 1. Stop from library: mysql> stop slave;2. Look at the current state from the library. As in the previous view of the main library state. But now it is copied from the library, so see:mysql> show slave status from library state; write down Relay_master_log_file and Exec_master_log_pos, and use the same as before. 3. Back up the data from the library. Mysqldump4. Restoring data from a new library 5. Set the new slave parameter from the library. Change Master to Master_host = ' 192.168.3.119 ', master_port = 3306,master_user = ' r Epl_user ', master_password= ' root ', master_log_file= ' master-bin.000005 ', master_log_pos=194244; you can see that although the new from library is the data copied from the library , but actually Binlog's master is still pointing to the main library. In addition, the Master_log_file and Master_log_pos are set as the 2nd step in the Relay_master_log_file and Exec_master_log_posstart slave;
MySQL-master-slave structure. Add New Slave