Master-Slave replication issue
Hello!
I am trying to setup a master-slave replication on a MariaDB server with InnoDB.
In a couple of minuters after I type 'START SLAVE;' I get this error and replication fails:
MariaDB [(none)]> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 10.10.16.1
Master_User: zabbix-db-node2
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000129
Read_Master_Log_Pos: 8425286
Relay_Log_File: mysql-relay-bin.000004
Relay_Log_Pos: 5394307
Relay_Master_Log_File: mysql-bin.000127
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1452
Last_Error: Error 'Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`event_recovery`, CONSTRAINT `c_event_recovery_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE)' on query. Default database: 'zabbix'. Query: 'insert into event_recovery (eventid,r_eventid,correlationid,c_eventid,userid) values (29186090,29186093,null,null,null)'
Skip_Counter: 0
Exec_Master_Log_Pos: 5394019
Relay_Log_Space: 218176956
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1452
Last_SQL_Error: Error 'Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`event_recovery`, CONSTRAINT `c_event_recovery_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE)' on query. Default database: 'zabbix'. Query: 'insert into event_recovery (eventid,r_eventid,correlationid,c_eventid,userid) values (29186090,29186093,null,null,null)'
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_SSL_Crl:
Master_SSL_Crlpath:
Using_Gtid: No
Gtid_IO_Pos:
Replicate_Do_Domain_Ids:
Replicate_Ignore_Domain_Ids:
Parallel_Mode: conservative
1 row in set (0.00 sec)
ERROR: No query specified
What is the reason? What should I do to solve it?