On Sun, Dec 6, 2009 at 7:15 AM, Simon J Mudd <sjmudd@stripped> wrote:
> song.voong@stripped (Song Voong) writes:
>
>> 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?
Simon listed many good things to check. There are two other things to check:
1) confirm the slave did not crash/restart (either mysqld restart or
server reboot). Slave replication state is not crashproof and on a
crash transactions can get replayed. This is easy to check.
2) confirm applications are not connecting to the slave and changing
rows directly. This is not easy to check. Even when the slave runs
with read_only set, an account with SUPER privilege can modify rows.
--
Mark Callaghan
mdcallag@stripped