报错信息:
Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '6f577885-e5d0-11ee-a94a-0242c0a80067:1' at source log 7364ffd6441c-bin.000006, end_log_pos 724. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
根据报错信息查看具体内容
select * from performance_schema.replication_applier_status_by_worker\G
解析binlog日志查看
mysqlbinlog -vvv 7364ffd6441c-bin.000006
看起来因该是主库的的一个school库被手动删除,而从库中没有这个school导致binlog不一致出现报错,那么只要在从库中将这个事务手动的跳过即可
首先停止线程
stop slave;
跳过事务
set @@session.gtid_next='6f577885-e5d0-11ee-a94a-0242c0a80067:1';
begin;
commit;
Set @@SESSION.GTID_NEXT = AUTOMATIC;
启动线程检查复制关系
start slave;
show slave status\G