# MySQL replication process breaks

**URL:** <https://forums.percona.com/t/mysql-replication-process-breaks/4649>\
**Category:** Other MySQL® Questions\
**Created:** [January 6, 2016, 4:56am UTC](https://forums.percona.com/t/mysql-replication-process-breaks/4649 "2016-01-06T04:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksej.lopasov](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@aleksej.lopasov](https://forums.percona.com/u/aleksej.lopasov)\
**Post date:** [January 6, 2016, 4:56am UTC](https://forums.percona.com/t/mysql-replication-process-breaks/4649/1 "2016-01-06T04:56:20Z")

</div>

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 (`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
