Earlier today I had a MySQL slave go down for a few hours, which wasn’t a big deal. When it was brought back up it wasn’t syncing properly:
Apparently there was an issue with a query that was showing up under LAST_ERROR; running
1STOP SLAVE; 2SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; 3START SLAVE;
fixed the issue and then issued another SHOW SLAVE STATUS\G; and got the correct output:
About half an hour later the slave was all caught up and replication was working again.