MySQL master-slave replication failure Case One

Source: Internet
Author: User
Tags server error log

Case one:

In the M-s a master one from the state, accidentally written from the library, resulting in master-slave synchronization failure

Fault simulation:

In slave:

First create a database

Crate database Buttongbu;

In master

Also create a database,

Crate database Buttongbu;

At this point in the view from the library

In slave

Show slave Status\g, error code 1007 found

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/83/A1/wKiom1d41GzCYRn_AADtpRILeIc121.png "title=" 0001. PNG "alt=" Wkiom1d41gzcyrn_aadtprileic121.png "/>

Workaround:

Method One:

The Stop Slave;set global Sql_slave_skip_counter =1 indicates that the implementation of N updates is ignored, N>0start salve;

Check master-Slave synchronization status, restore consistency

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/A1/wKiom1d41X2SteVnAACv8A0pINc509.png "title=" 0002. PNG "alt=" Wkiom1d41x2stevnaacv8a0pinc509.png "/>


Method Two:

Skipping specified error based on error code

Slave-skip-errors = 1032,1007 Slave-skip-errors = All use all with caution

For error codes, we should use the error message in the slave server error log to provide the error number and the output of show slave status.




Network articles;

Exception statement skipping error handling in master-slave synchronization

http://my.oschina.net/u/214948/blog/87846


This article is from the "Crazy_sir" blog, make sure to keep this source http://douya.blog.51cto.com/6173221/1795350

MySQL master-slave replication failure Case One

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.