Relay log read failure解决办法

show slave status \G  提示如下错误
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, 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.

原因 
在传输master log-bin时,因网络原因或slave机压力问题,造成log-relay文件格式错误


解决方法一: 
找到relay-log.info,第一行记录了当前正在执行的log-relay文件名 
找到该文件的下一个文件 
使用mysqlbinlog查看该文件,在#98这行有Rotate to log-bin.000004 pos: 4等信息,这就是目前slave停止的位置 
在slave上重新指定同步位置,重新执行:
change master to 
master_host='1.1.1.1',
master_user='repl',
master_password='111111',
master_port=3306,
master_log_file='log-bin.000004',
master_log_pos=4;
slave start;
show slave status\G;

解决方法二:
stop slave之后,重新reset slave;
再看,数据已经开始同步了



本文转自 lover00751CTO博客,原文链接:http://blog.51cto.com/wangwei007/1101683,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值