My Oracle Support Banner

MySQL Replication on 5.5 Replica is Getting 'Duplicate Key' Errors (Doc ID 1482324.1)

Last updated on MAY 25, 2021

Applies to:

MySQL Server - Version 5.5 to 5.5 [Release 5.5]
Information in this document applies to any platform.

Symptoms

When attempting to replicate the following error occurs:


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Take a backup using mysqldump with --flush-logs and --single-transaction used for the command.
  While the backup is being performed, transactions should be running that are updating/inserting data.
2. Restore the slave using the backup taken.
3. Start replication.

Changes

The 5.5 version FLUSH LOGS command causes an implicit COMMIT to occur, which is also reproduced using the mysql_refresh() C API function call.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.