Hi,I have an issue in master-slave replication process.
I have made a database copy from master with xtrabackup and prepared it on slave. Then I configured a replication. But every time it breaks (err 1452) while executing one query:
Error ‘Cannot add or update a child row: a foreign key constraint fails (
fk_name FOREIGN KEY (
id) ON DELETE)’ on query. Default database: ‘db_name’. Query: 'INSERT IGNORE INTO table_name (
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