Now that you kind people have pointed me in the right direction as far as log-bin was concerned, I've moved on to trying to replicate the databases from the primary to the secondary. I've created the connection profile and started the secondary connection, but when I ran show slave 'master01' status\G I got the following error: Last_Errno: 1062 Last_Error: Could not execute Write_rows_v1 event on table databasename.oc_filecache; Duplicate entry '110' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.00000#, end_log_pos ###### How do I resolve this duplicate entry error? And do I need to do the same resolution on the primary as well? Ubuntu Server 23.10, mariadb version 15.1 Distrib 10.11.6-MariaDB Ken -- If you ever think international affairs make sense, remember this: because a Serb shot an Austrian in Bosnia, Germany invaded Belgium.
Your options are: 1) Skip the transaction and hope for the best 2) Verify that the data is the same on both sides (look at pt-table-checksum and pt-table-sync from percona toolkit 3) Re-seed the slave from scratch On Sat, Feb 17, 2024 at 3:49 PM Ken Wright via discuss <discuss@lists.mariadb.org> wrote:
Now that you kind people have pointed me in the right direction as far as log-bin was concerned, I've moved on to trying to replicate the databases from the primary to the secondary.
I've created the connection profile and started the secondary connection, but when I ran
show slave 'master01' status\G
I got the following error:
Last_Errno: 1062 Last_Error: Could not execute Write_rows_v1 event on table databasename.oc_filecache; Duplicate entry '110' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.00000#, end_log_pos ######
How do I resolve this duplicate entry error? And do I need to do the same resolution on the primary as well?
Ubuntu Server 23.10, mariadb version 15.1 Distrib 10.11.6-MariaDB
Ken -- If you ever think international affairs make sense, remember this: because a Serb shot an Austrian in Bosnia, Germany invaded Belgium. _______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-leave@lists.mariadb.org
Hi Ken, to add up to previous suggestions, if you're still struggling of course..
Now that you kind people have pointed me in the right direction as far as log-bin was concerned, I've moved on to trying to replicate the databases from the primary to the secondary.
I've created the connection profile and started the secondary connection, but when I ran
show slave 'master01' status\G
I got the following error:
Last_Errno: 1062 Last_Error: Could not execute Write_rows_v1 event on table databasename.oc_filecache; Duplicate entry '110' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.00000#, end_log_pos ######
How do I resolve this duplicate entry error? And do I need to do the same resolution on the primary as well?
For some reason the slave could not execute the SQL statement. There's nothing to do on the master side but to examine its binlog, especially when your slave has binlogging ON. Execute mysqlbinlog -v on relevant binlog files of the both sides and look after records with the PK of the failed one. Most probably you'll soon find a discrepancy between the log on the record. E.g a DELETE operation was not applied on slave while it was done (so binlogged) om master.
Ubuntu Server 23.10, mariadb version 15.1 Distrib 10.11.6-MariaDB
Ken
Cheers, Andrei
participants (3)
-
andrei.elkin@pp.inet.fi
-
Gordan Bobic
-
Ken Wright