时间:2021-07-01 10:21:17 帮助过:41人阅读
解决方法一:
mysql> stop slave; mysql> set gtid_next=‘ce856f95-5aa9-11ea-87f4-0050569348f5:39‘; mysql> begin; mysql> commit; mysql> set GTID_NEXT=‘AUTOMATIC‘; mysql> start slave;再查案Slave_IO_Running和Slave_SQL_Running都是Yes状态,恢复正常(此方法要注意确认GTID,避免跳过需要的事务,具体方法在ERROR-1032文中说明) 解决方法二: 利用percona-toolkit工具集中的pt-slave-restart命令(跳过错误)
[root@ty14166 ~]# pt-slave-restart -uroot -p****** 2020-03-04T21:16:42 p=...,u=root ty14166-relay-bin.000011 891 1062 后台日志: [Note] Slave SQL thread for channel ‘‘ initialized, starting replication in log ‘mysql-binlog.000004‘ at position 986,
relay log ‘./ty14166-relay-bin.000011‘ position: 891
再查案Slave_IO_Running和Slave_SQL_Running都是Yes状态,恢复正常 GTID-MODE=OFF状态的处理方法:
mysql> stop slave; mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = n; mysql> start slave;
MySQL 主从复制 ERROR-1062
标签:主从复制 exe starting handler nlog auto master mysql-bin replicate