MySQL Forums
Forum List  »  General

Recovering from 'duplicate entry' error in replication setup
Posted by: Charles Pearson
Date: May 17, 2010 09:10AM

Hey guys,

I have a master-master MySQL replication setup between two web servers. We make use of a hardware load balancer in front of the two servers. Recently, some inconsistencies were being noticed between the two servers, and I realized that both servers were show a "duplicate entry" error when doing a 'show slave status\G;'.

I have found out how to get around this problem (adding slave-skip-errors = 1062 to the my.cnf file), however, I need to know how to move forward from where I am now to get the servers back in sync. I see that both servers are no longer advancing through the relay log file (when issuing a 'show slave status\G;', the Read_Master_Log_Pos continues to increment, but Relay_Log_Pos does not). Does this mean that the servers have stopped replication completely ever since it hit the error? And if this is the case, can I simply make my change to the my.cnf file, restart the MySQL services, and both servers will replay all un-played relay log file entries to get to the point where both are synced up again?

Thanks for the help in advance.

Options: ReplyQuote


Subject
Written By
Posted
Recovering from 'duplicate entry' error in replication setup
May 17, 2010 09:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.