背景: 基于GTID的从库服务器磁盘使用率100%,扩容磁盘后报错,开启复制,过一会就报错13121错误
一.报错现象:
Last_SQL_Errno: 13121
Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, the server was unable to fetch a keyring key required to open an encrypted relay log file, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
二.报错原因:
当磁盘写满后,mysql无法向元信息表中写数据,中继日志不完整,直接启动复制就出现报错了
三.解决步骤:
1.先停止复制
stop slave;
2.重置从库配置
reset slave all;
3.重新设置主从信息
master_host='192.168.0.23',master_user='repl',master_password='123456',master_port=3306,master_auto_position=1;
4.查看复制状态
show slave status\G;