问题原文
原帖链接 · adminz · CC BY-SA 3.0
I have added an extra Slave server to an existing MySQL Replication. The Master server and the old Slave server are working fine without any issue, but the newly added server is stoping with the following error:
Last_SQL_Errno: 1032
Last_SQL_Error: Could not execute Update_rows event on table xxx.email_events; Can't find record in 'email_events', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysqld-bin.000410, end_log_pos 368808733
It will be fine for some hours after repairing.
Questions
- Can we permanently skip Last_SQL_Errno: 1032?
- Is there any issue with skipping this error?
社区高分解答
原帖链接 · LF-DevJourney · CC BY-SA 4.0
You can locate the sql clause code like /usr/bin/mysqlbinlog -v --start-position=142743807 --stop-position=147399325 /data/mysql/data/master-bin.000010 > temp.log
Then compare slave and master database difference according to temp.log on specific pos. Then update slave database.
Then skip that line with mysql -e "stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;";
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
