Relay log read failure的处理
浏览:2305次 出处信息
| 以下是代码片段: mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.10.118 Master_User: repl_wu Master_Port: 3306 Connect_Retry: 30 Master_Log_File: mysql-bin.005121 Read_Master_Log_Pos: 64337286 Relay_Log_File: relay-bin.003995 Relay_Log_Pos: 18446697137031827760 Relay_Master_Log_File: mysql-bin.005121 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1594 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. Skip_Counter: 0 Exec_Master_Log_Pos: 4 Relay_Log_Space: 64337901 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 1594 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, 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. 1 row in set (0.00 sec) |
从上面可以看到是中继日值或是Master上的日值出问题了。
首先如果是中继日值坏掉,那只需要找到同步的时间点,然后重新同步,这样就可以有新的中继日值了。如果Master上的日值坏了就麻烦了。
从经验来看,这是中继日值出问题了。处理方法:
需要找到同步的点。
日值为:Master_Log_File: mysql-bin.005121,Relay_Master_Log_File: mysql-bin.005121以Relay_Master_Log_File为准,Master_Log_File为参考。
日值执行时间点:
| 以下是代码片段: Exec_Master_Log_Pos: 4 |
那么现在就可以:
以下是代码片段:
mysql>stop slave;
mysql>change master to Master_Log_File=’mysql-bin.005121’, Master_Log_Pos=4;
mysql>start slave;
mysql>show slave status\G;
进行确认。
建议:
在使用MySQL-5.1.36以下的版本的同学,请尽快升级到MySQL-5.1.40 & MySQL-5.1.37sp1
建议继续学习:
- 关于IO的同步,异步,阻塞,非阻塞 (阅读:15779)
- mysql 主从同步原理 (阅读:6199)
- 消息分发的同步均衡策略 (阅读:5685)
- 五款最好的免费同步软件 (阅读:4390)
- MySQL5.5复制/同步的新特性及改进 (阅读:4286)
- 大量小文件的实时同步方案 (阅读:4219)
- redis源代码分析 - replication (阅读:4010)
- 三款面向 Amazon S3 的开源文件同步工具之对比 (阅读:3804)
- rsync主动同步代码 (阅读:3549)
- truncate table 不能复制到从库 (阅读:3200)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
扫一扫订阅我的微信号:IT技术博客大学习
<< 前一篇:合理使用MySQL的Limit进行分页
后一篇:truncate table 不能复制到从库 >>
文章信息
- 作者:wubx 来源: MySQL支持
- 标签: 同步
- 发布时间:2009-11-30 09:09:31
建议继续学习
近3天十大热文
-
[918] WordPress插件开发 -- 在插件使用 -
[134] 解决 nginx 反向代理网页首尾出现神秘字 -
[54] 整理了一份招PHP高级工程师的面试题 -
[52] 海量小文件存储 -
[52] 如何保证一个程序在单台服务器上只有唯一实例( -
[52] 全站换域名时利用nginx和javascri -
[51] Innodb分表太多或者表分区太多,会导致内 -
[50] 用 Jquery 模拟 select -
[49] CloudSMS:免费匿名的云短信 -
[48] 分享一个JQUERY颜色选择插件
