mysql slave error

213 阅读1分钟

Could not execute Update_rows event on table m_something; Can't find record in m_something

just stop the slave using

mysql> stop slave;
Then set the global variable sql_slave_skip_counter to 1, for example:
mysql> set global sql_slave_skip_counter=1;
Then start the slave:
mysql> start slave;
Then check if the slave is working or not:
mysql> show slave status \G;
If the error is still there, set a bigger value in sql_slave_skip_counter like:
mysql> set global sql_slave_skip_counter=1000;
Again, check the status of the slave.

If you find the skip_sql value is non zero in the slave status then stop the slave again and do:

mysql> set global sql_slave_skip_counter=0;
mysql> start slave;

原文: dba.stackexchange.com/questions/2…