MySQL master-slave delay replication

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.