• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > MySQL5.1主从同步出现Relay log read failure错误解决方法

MySQL5.1主从同步出现Relay log read failure错误解决方法

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了mysql5.1,mysql5.1安装图解,mysql5.1 64位下载,mysql5.1下载,mysql5.1安装教程等相关知识,希望本文的分享对您有所帮助

众所周知MySQL5.1的Replication是比较烂的。MySQL的每一个版本更新关于同步方面每次都是可以看到一大堆。但MySQL 5.1性能是比较突出的。所以经不住诱惑使用MySQL 5.1。所以也要经常遇到一些Bug。如:
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)
</div>

从上面可以看到是中继日值或是Master上的日值出问题了。

首先如果是中继日值坏掉,那只需要找到同步的时间点,然后重新同步,这样就可以有新的中继日值了。如果Master上的日值坏了就麻烦了。

从经验来看,这是中继日值出问题了。处理方法:

需要找到同步的点。

日值为:Master_Log_File: mysql-bin.005121,Relay_Master_Log_File: mysql-bin.005121以Relay_Master_Log_File为准,Master_Log_File为参考。

日值执行时间点:

那么现在就可以:
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;
</div>

进行确认。

建议:

在使用MySQL-5.1.36以下的版本的同学,请尽快升级到MySQL-5.1.40 & MySQL-5.1.37sp1

</div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • mysql5.1 command line client 登录时出现闪退如何解决
  • MySQL5.1如何在CentOS系统中升级至5.5.36的示例详解
  • Linux下MySQL5.1安装详解
  • MySQL5.1主从同步出现Relay log read failure错误解决方法

相关文章

  • 2018-12-05MySql如何查看表大小的实例详解
  • 2018-12-05MySQL基本调度方法浅析
  • 2018-12-05如何向MySQL数据库或者Oracle或导入表格文件
  • 2018-12-05使用mysql中遇到的几个问题
  • 2018-12-05oracle 触发器 学习笔记
  • 2018-12-05事务概念函数定义与用法汇总
  • 2018-12-05MySQL连接时出现1449与1045异常解决办法详解
  • 2018-12-05Oracle date如何比较大小分析
  • 2018-12-05详细介绍linux下mysql创建新的用户的方法
  • 2017-09-29mysql-connector-odbc-5.1.13-win32.msi安装成功后,ODBC数据源管理器无法显示该MySql驱动的问题

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • 此数据库没有有效所有者,因此无法安装数据库关系图支持对象
    • 用mysqldump备份和恢复指定表的方法
    • MySQL 中查看表结构的命令有哪些
    • mysql 锁表锁行语句分享(MySQL事务处理)
    • 推荐10款涉及参数特效(收藏)
    • Mysql系列(十七)Mysql指令全集
    • mysql慢查询使用详解
    • 在数据库中自动生成编号的实现方法分享
    • mysql中char与varchar的区别分析
    • Sql Server datetime问题

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有