List:Replication« Previous MessageNext Message »
From:Song Voong Date:December 3 2009 10:01pm
Subject:ERROR 1062: Duplicate entry - replication
View as plain text  
Hi,

I been getting this error and my replication stoppped.

ERROR 1062: Duplicate entry
 Last_Error: Error 'Duplicate entry '1010769-50-65% Cttn, 35% Rayon' for key
2' on query. Default database: 'm3'. Query: 'Update item_attribute SET
lupdateby='TINAA',item_id='1010769',value='65% Cttn, 35%
Rayon',source=3,attribute_definition_id='50' WHERE item_attribute_ID =
118838555'

I know I can do a  slave-skip-errors 1062 and by pass it, I been reading the
forum and it is a common issues with replication, But what is causing this?
I mean it is updating stuff on the master, and slave should get updated too
. NO?

Sometimes, errors should be ignored because they are not necessary at all.
In MySQL especially for replication, the general architecture is to have a
host for write and other hosts for read. As a result, response time of the
whole system should be more scalable. If something goes wrong at the master
node where all write operations must be performed, the error may propagate
to other replications. One of common error oftenly occurs during replication
is duplicate entry. It is possible to prevent this error which may lead the
replication to stop.

This problem was reported for so long and it it supposed to be fixed
already. However, I still got them sometimes. The solution is to specify
slave-skip-error

Anyone know anyway to fix this? I don't want to skip that error.

I checked the master and slave, and indeed, when i skip it slave don't got
the same data.

Please advise.

Running mysql 5.0.82

Thread
ERROR 1062: Duplicate entry - replicationSong Voong3 Dec
  • Re: ERROR 1062: Duplicate entry - replicationSimon J Mudd6 Dec
    • Re: ERROR 1062: Duplicate entry - replicationMARK CALLAGHAN6 Dec
      • Re: ERROR 1062: Duplicate entry - replicationSimon J Mudd6 Dec
        • Re: ERROR 1062: Duplicate entry - replicationMARK CALLAGHAN6 Dec
          • Re: ERROR 1062: Duplicate entry - replicationSimon J Mudd7 Dec