MySQL Forums
Forum List  »  Replication

Replication issue
Posted by: Алексей Лопасов
Date: January 06, 2016 04:15AM

Hi, I have an issue in master-slave replication process.
I have done a database copy with xtrabackup and configured a replication. But every time it breaks while executing one query:

Error 'Cannot add or update a child row: a foreign key constraint fails (`db_name`.`table1_name`, CONSTRAINT `fk_name` FOREIGN KEY (`product_id`) REFERENCES `table2_name` (`id`) ON DELETE)' on query. Default database: 'db_name'. Query: 'INSERT IGNORE INTO table_name (`product_id`, `fitment_id`) VALUES ('345824756', '2346278');

I tried to execute this query straight in mysql console and everything worked. It doesn't matter is foreign-key-check 0 or 1. Query works in console but doesn't work, when comes via replication process.
Are there any idea why is that?

Master mysql version 5.6.24-72.2
Slave mysql version 5.6.27-75.0

Options: ReplyQuote


Subject
Views
Written By
Posted
Replication issue
1400
January 06, 2016 04:15AM
723
January 09, 2016 11:57PM


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.