Re: Replication sql errors
Posted by:
sharath s
Date: May 06, 2021 12:08AM
Hello Peter,
Please find the sample errors.
2021-05-01T08:20:35.952168Z 18830 [ERROR] Slave SQL for channel '': Could not execute Update_rows event on table tablename; Can't find record in 'create_transaction_reqest', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.002284, end_log_pos 50964167, Error_code: 1032
2021-05-01T08:20:54.081804Z 18834 [ERROR] Slave SQL for channel '': Could not execute Write_rows event on table tablename; Cannot add or update a child row: a foreign key constraint fails (`DBNAME`.`transaction`, CONSTRAINT `FK_to4c8k9xlntlob9lm97difd8` FOREIGN KEY (`to_wallet`) REFERENCES `tablename` (`pkey`)), Error_code: 1452; handler error HA_ERR_NO_REFERENCED_ROW; the event's master log mysql-bin.002284, end_log_pos 58435745, Error_code: 1452
2021-05-01T08:21:51.241943Z 18836 [ERROR] Slave SQL for channel '': Could not execute Update_rows event on table tablename; Cannot add or update a child row: a foreign key constraint fails (`tablename, CONSTRAINT `FK_6cxv1paumr39nwswy6kv6kqnh` FOREIGN KEY (`bus_kit_fkey`) REFERENCES `tablename` (`pkey`)), Error_code: 1452; handler error HA_ERR_NO_REFERENCED_ROW; the event's master log mysql-bin.002284, end_log_pos 75766666, Error_code: 1452
Could not execute Delete_rows event on table tablename; Can't find record in 'tablename', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.002308, end_log_pos 4571927
My one query is can i pull in all the tables from the mysql error log and try to refresh them separately after stopping the replication. Will this fix the problem.
Regards,
Sharath