mysql主从Relay log read failure解决

栏目: 数据库 · 发布时间: 6年前

内容简介:我的树莓派作为博客的mysql slave,一直在备份数据。前几日折腾树莓派,频繁重启树莓派,可能导致relay log损坏了,show slave status显式主从同步错误:解决方法如下(在slave上操作)。

我的树莓派作为博客的mysql slave,一直在备份数据。

前几日折腾树莓派,频繁重启树莓派,可能导致relay log损坏了,show slave status显式主从同步错误:

 Last_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, 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.

解决方法如下(在slave上操作)。

找到断点

show slave status\G;

找到Relay_Master_Log_File和Exec_Master_Log_Pos,表示目前同步到了master的哪个binlog文件,以及binlog文件的哪个偏移量。

停止主从

stop slave;

修改同步起点

change master to master_log_file='bin.000001' , master_log_pos=242312863;

重启同步

start slave;

重新检查同步是否恢复:

show slave status\G;

博主无私的分享着知识,你愿意送他一顿热腾腾的早餐吗?

mysql主从Relay log read failure解决

以上所述就是小编给大家介绍的《mysql主从Relay log read failure解决》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

计算机程序设计艺术(第2卷)

计算机程序设计艺术(第2卷)

Donald E. Knuth / 苏运霖 / 国防工业出版社 / 2002-8 / 98.00元

本书是国内外业界广泛关注的7卷本《计算机程序设计艺术》第2卷的最新版。本卷对半数值算法领域做了全面介绍,分“随机数”和“算术”两章。本卷总结了主要算法范例及这些算法的基本理论,广泛剖析了计算机程序设计与数值分析间的相互联系,其中特别值得注意的是作者对随机数生成程序的重新处理和对形式幂级数计算的讨论。 本书附有大量习题和答案,标明了难易程度及数学概念的使用。 本书内容精辟,语言流畅,引人入胜,可供从......一起来看看 《计算机程序设计艺术(第2卷)》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具