MySQL Replication skip error
Last_Errno: 1032
Last_Error: Could not execute Update_rows event on table mamc.id_findloc; Can't find record in 'id_findloc', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log 1.000221, end_log_pos 2256175
Last_Error: Could not execute Update_rows event on table mamc.id_findloc; Can't find record in 'id_findloc', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log 1.000221, end_log_pos 2256175
You now need to know which exact GTID needs to skip to start the replication again. You see at the output
Retrieved_Gtid_Set: 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:183900240-183900398:188376296-241806257
It means Slave retrieved the last GTID 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:241806257.
The next line of the output
Executed_Gtid_Set: 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:1-234830504
It means Slave could execute GTIDs upto 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:234830504. So GTIDs 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:234830505 to 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:241806257 are retrieved but pending to be executed.
That means it stopped during execution of GTID 8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:234830505(one greater than last executed). So we need to skip this GTID to be executed and this is called “MySQL Replication skip error” tricks. Follow the step by step procedure to apply “MySQL Replication skip error” technique
Stop The slave
mysql> stop slave;
Set global GTID_NEXT variable to intended GTID to be skipped
mysql> SET GTID_NEXT='8c3cb328-b0b1-11e2-bdb6-3440b5acc06c:234830505';
Execute an empty transaction
mysql> BEGIN;
mysql> COMMIT;
Set global GTID_NEXT variable to AUTOMATIC again
mysql> SET GTID_NEXT='AUTOMATIC';
Start Slave again
mysql> start slave;
Check Slave status again
mysql> show slave status\G
Comments
Post a Comment