Troubleshooting MySQL Master-Slave Replication Errors

Many times I have seen broken MySQL Master-Slave syncing on various servers because of Duplicate Entry Errors. So here I am suggesting steps to overcome these issues.

1. Login to Slave Server & Open /etc/my.cnf

Add following directive under [mysqld] section:

[mysqld]

……………..

……………..

slave-skip-errors = 1062,1050,1060

Where,

Error 1062 means Duplicate entry

Error 1060 means Duplicate column name

Error 1050 means Table already exists

2. Restart mysql server

/etc/init.d/mysqld restart

Enjoy!!!

Leave a Reply

Your email address will not be published. Required fields are marked *