Mysql replication errors
I’ve just wasted an hour trying to figure out why some code didn’t work on a webserver. The code is getting some info from the database, which is replicated from a master database. I was selecting new data, which weren’t on the slave due to replication errors.
I just did this in mysql
SLAVE STOP;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
This way, they slave would skip the erroneous query and continue. Of course, the database won’t be in sync anymore. But since it was a dev-server, it doesn’t matter.