Re: Error Duplicate entry - Master-Slave replication
Posted by:
Rick James
Date: January 11, 2012 10:16AM
Another way in which replication can be unwittingly screwed up by a user:
binlog-do-db = db1
USE db2;
INSERT INTO db1.tbl ...
When using binlog/replicate-do/ignore (other than ...wild...), the USE statement controls whether the subsequent writes are replicated. The example above show how a statement would _not_ be replicated when it should be. (Hmmm... I guess that won't lead to dup key.)
Sounds like you need to rebuild the slave, then keep a close eye on everything happening to the table in question.
I have not seen any caused by MySQL since mid-versions of 4.0. Every error I have encountered has been traced to "user error".
Some ways to screw things up, but probably knowingly:
Do you have Triggers?
Have you ever used SET SQL_BIN_LOG=0?
Which are you using: RBR or SBR or a mixture? (Row/Statement Based Replication)
Subject
Views
Written By
Posted
10348
January 04, 2012 05:02PM
4169
January 05, 2012 07:46PM
4423
January 10, 2012 10:06AM
Re: Error Duplicate entry - Master-Slave replication
4678
January 11, 2012 10:16AM
3915
January 18, 2012 01:46PM
3352
February 21, 2012 07:13AM
3712
February 22, 2012 09:44PM
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.