Aug 25, 2011 - 1 minutes

MySQL Slave not syncing after reboot

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:

1 Seconds_Behind_Master: NULL

Apparently there was an issue with a query that was showing up under LAST_ERROR; running

1 STOP SLAVE;
2 SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
3 START SLAVE;

fixed the issue and then issued another SHOW SLAVE STATUS\G; and got the correct output:

1 Seconds_Behind_Master: 27269

About half an hour later the slave was all caught up and replication was working again.

comments powered by Disqus