Slave_IO_Running: Yes
Slave_SQL_Running: No
......
Last_Errno: 1062
Last_Error: Could not execute Write_rows event on table goodb_web.address_account_info_snapshoot_20190519; Duplicate entry '8132' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000008, end_log_pos 167454239
mysql>
stop slave sql_thread;
set global sql_slave_skip_counter=1;
start slave sql_thread;
发现还是报错。
查看了从库的事件确定是有事件执行的
1、简单解决方法:
查看是否开启:show variables like 'event_scheduler';
关闭:set global event_scheduler = off;
2、一直保持关闭的方法:
在mysql配置文件my.cnf的[mysqld]部分加上:
#默认关闭事件
event_scheduler = OFF