MySQL master-Slave synchronization Last_sql_error

Source: Internet
Author: User

Reference article:

http://kerry.blog.51cto.com/172631/277414/

http://hancang2010.blog.163.com/blog/static/18246026120107602018998/

During synchronization, a trigger statement was found to be incorrect, resulting in a subsequent synchronization statement not being performed.

Solution:

mysql > Stop slave;

MySQL > SET GLOBAL sql_slave_skip_counter = 1; # # (normally 1 is the safest, and may not be set in the case of Skip_error.)

mysql > Start slave; # #启动同步

MySQL > show slave status\g; Discover slave_sql_running_state:updating .... Description data is being updated

Additional notes:

Http://www.2cto.com/database/201108/100485.html

You can also set the following options in MY.CNF to automatically skip this error.
slave-skip-errors=1062

Related Article

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.