RSS feed

MySQL skip duplicate replication errors

December 14th, 2008 | Posted in MySQL | No Comments

MySQL replication will stop if an error occurs when running a query on the slave. The reason is so you can resolve the problem, thus keeping the data consistent with the master. You can skip those errors if you know those queries and why they are failing.

Skip one query

mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;

Skip all duplicate errors

edit my.cnf and add:

slave-skip-errors = 1062

You can skip all types of errors using the same method abobe, seperating each error code you wish to skip with a comma.

http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html



No Comments to “MySQL skip duplicate replication errors”

There are no comments yet, add one below.


Leave a Comment






Categories