JAVA、PHP、前端、APP、网站开发 - 开发技术学习

开发技术学习 » 数据库 » mysql数据同步错误:Relay log read failure的处理

mysql数据同步错误:Relay log read failure的处理

此文被围观2708日期: 2013-06-18 分类 : 数据库  标签:  ·····
前一段时间在同事的电脑上配置了数据库同步的功能。 运行了大概半个月后出现了如下错误: 输入的命令是:show slave statusG; [php] 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 lo event entry. The possible reasons are: the master's binary log is corrupted (y u 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. Replicate_Ignore_Server_Ids: Master_Server_Id: 22 1 row in set (0.20 sec) ERROR: No query specified //这句的错误是G后面加了';'引起! [/php] 看了一下网上的处理方法: 一是说内存不足引起!于是修改电脑的虚拟内存,但是问题还是没有解决! 二是中继日值坏掉,那只需要找到同步的时间点,然后重新同步,这样就可以有新的中继日值了。如果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 那么现在就可以: 以下是代码片段: [php] mysql>stop slave; mysql>change master to Master_Log_File=’mysql-bin.005121’, Master_Log_Pos=4; mysql>start slave; mysql>show slave statusG; //进行确认 [/php] 建议: 在使用MySQL-5.1.36以下的版本的同学,请尽快升级到MySQL-5.1.40 & MySQL-5.1.37sp1

站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。蜀ICP备12031064号