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