Showing posts with label Duplicate error 1062. Show all posts
Showing posts with label Duplicate error 1062. Show all posts

Wednesday, August 22, 2012

How to skip the duplicate error (1062) on a MySQL Replication slave

Overview

This post is to show how to avoid 1062 errors.
This is to use carefully

Set the slave-skip-errors in your /etc/my.cnf

  • Stop the replication
service mysql stop
  • Add slave-skip-errors=1062 in your /etc/my.cnf under the [mysqld] section
  • Restart your replication
service mysql start
  • Verify the replication
show slave status\G