MySQL's master-slave replication is the basis for a large-scale MySQL cluster, which is widely used in daily production environments, The MySQL5.6 began to make great progress in MySQL's master-slave replication after the continuous refactoring of MySQL's underlying code, and introduced master-slave multithreaded Replication (http://blog.51cto.com/jim123/1961241) in version 5.7. While in the 5.6 version of the MySQL master-slave replication support Slave on the delay replication master without the use of third-party tools to implement, master-slave replication delay can be deleted in the master error after a certain time delay in the slave to quickly retrieve the deleted data, As for the setup, it is easy to add a parameter when you set up the main library from the library:
Change MASTER to Master_delay = 3600; #这里的单位是秒3600秒即一个小时
At this point in the open slave, and then look at the state of slave, there will be 2 parameters:
Sql_delay: Displays the time, in seconds, of the primary and standby delay that has been set; Sql_remaining_delay: Shows the remaining primary and standby delay time, in seconds;
MySQL master-slave delay replication