常见错误:
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry
'1' for key 'PRIMARY'' on query. Default database: 'xsell'. Query:
'insert into wm_mobile_fb_notif (appid, uid, msg, sch_datetime) value
('724661897578833', '517464648', '@[517464648],', '2014-07-11
21:50:21')'
由于程序或者人手操作向slave数据库插入了重复数据会导致slave进程停止执行,解决方法是设置跳过错误的次数,然后重启slave进程。
SET GLOBAL sql_slave_skip_counter = N;
stop slave;
start slave;
资料参考出自: http://dev.mysql.com/doc/refman/5.0/en/set-global-sql-slave-skip-counter.html
转载于:https://blog.51cto.com/brucetam/1437039