iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >怎么解决MySQL中the master's binary log is corrupted报错问题
  • 950
分享到

怎么解决MySQL中the master's binary log is corrupted报错问题

2024-04-02 19:04:59 950人浏览 八月长安
摘要

本篇内容介绍了“怎么解决Mysql中the master's binary log is corrupted报错问题”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领

本篇内容介绍了“怎么解决Mysql中the master's binary log is corrupted报错问题”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

主从复制报错,下面是从库复制状态:

mysql> show slave status\G;

*************************** 1. row ***************************

               Slave_io_State: Waiting for master to send event

                  Master_Host: 192.168.129.150

                  Master_User: replicat

                  Master_Port: 3306

                Connect_Retry: 60

              Master_Log_File: mysql-bin.000197

          Read_Master_Log_Pos: 213271941

               Relay_Log_File: mysql-relay-bin.000584

                Relay_Log_Pos: 1037392990

        Relay_Master_Log_File: mysql-bin.000195

             Slave_IO_Running: Yes

            Slave_SQL_Running: No

...

                   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: 1037392827

              Relay_Log_Space: 2368588837

...

               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.

  Replicate_Ignore_Server_Ids:

             Master_Server_Id: 3

                  Master_UUID: 58c0c354-8652-11e6-bebe-40f2e9ddc532

             Master_Info_File: /data/DB/mysql/master.info

                    SQL_Delay: 0

          SQL_Remaining_Delay: NULL

      Slave_SQL_Running_State:

           Master_Retry_Count: 86400

                  Master_Bind:

      Last_IO_Error_Timestamp:

     Last_SQL_Error_Timestamp: 161018 09:38:49

....

中继日志读主库日志失败 ,顺道看下错误日志信息,日志显示从库9点37分时重启了,38分出现主从故障,看样子是因为从库异常重启导致的!

161018 09:37:39 mysqld_safe Number of processes running now: 0

161018 09:37:39 mysqld_safe mysqld restarted

...

2016-10-18 09:38:49 6042 [ERROR] Slave SQL: 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. Error_code: 1594

解决方法,重新设置主从进程解决:

mysql> stop slave;

Query OK, 0 rows affected (0.02 sec)

mysql> reset slave;

Query OK, 0 rows affected (0.57 sec)

mysql> change master to master_host='192.168.129.150',

    -> master_user='replicat',

    -> master_passWord='passw',

    -> master_log_file='mysql-bin.000195',

    -> master_log_pos=1037392827;

Query OK, 0 rows affected, 2 warnings (0.07 sec)

mysql> start slave;

Query OK, 0 rows affected (0.03 sec)

以前从库异常重启都没发生这类情况,网上查了相关资料,发现和relay_log_info_repository和relay_log_info_repository这两个参数有关

mysql> show variables like '%relay_log_info_repository%';
+---------------------------+-------+
| Variable_name             | Value |
+---------------------------+-------+
| relay_log_info_repository | FILE  |
+---------------------------+-------+

1 row in set (0.00 sec)

mysql> show variables like '%relay_log_info_repository%';
+---------------------------+-------+
| Variable_name             | Value |
+---------------------------+-------+
| relay_log_info_repository | FILE  |
+---------------------------+-------+

1 row in set (0.00 sec)

把FILE修改成TABLE可以降低这种主从失败发生的概率。

“怎么解决MySQL中the master's binary log is corrupted报错问题”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!

您可能感兴趣的文档:

--结束END--

本文标题: 怎么解决MySQL中the master's binary log is corrupted报错问题

本文链接: https://www.lsjlt.com/news/66784.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 怎么解决MySQL中the master's binary log is corrupted报错问题
    本篇内容介绍了“怎么解决MySQL中the master's binary log is corrupted报错问题”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领...
    99+
    2022-10-19
  • 怎么解决mysql的报错[ERROR] Native table 'performance_schema'问题
    本篇内容主要讲解“怎么解决mysql的报错[ERROR] Native table 'performance_schema'问题”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性...
    99+
    2022-10-19
  • 怎么解决mysql数据库报错edit the grastate问题
    本篇内容主要讲解“怎么解决mysql数据库报错edit the grastate问题”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么解决mysql数据库报错e...
    99+
    2022-10-19
  • 怎么解决Mysql中的Last_Errno报错问题
    本篇内容主要讲解“怎么解决Mysql中的Last_Errno报错问题”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么解决Mysql中的Last_Errno报错...
    99+
    2022-10-19
  • 怎么解决mysql binlog中报错[ERROR] unknown问题
    这篇文章主要讲解了“怎么解决mysql binlog中报错[ERROR] unknown问题”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么解决mysql...
    99+
    2022-10-19
  • 怎么解决MySQL中ERROR 1044 (42000)报错问题
    这篇文章主要讲解了“怎么解决MySQL中ERROR 1044 (42000)报错问题”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么解决MySQL中ERR...
    99+
    2022-10-19
  • 怎么解决MySQL中的ERROR 1799报错问题
    这篇文章主要介绍“怎么解决MySQL中的ERROR 1799报错问题”,在日常操作中,相信很多人在怎么解决MySQL中的ERROR 1799报错问题问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方...
    99+
    2022-10-19
  • 怎么解决MySQL中ERROR 1054 (42S22)报错问题
    这篇文章主要介绍“怎么解决MySQL中ERROR 1054 (42S22)报错问题”,在日常操作中,相信很多人在怎么解决MySQL中ERROR 1054 (42S22)报错问题问题上存在疑惑,小编查阅了各式...
    99+
    2022-10-19
  • 怎么解决Mysql中的Last_SQL_Error: 1594报错问题
    这篇文章主要介绍“怎么解决Mysql中的Last_SQL_Error: 1594报错问题”,在日常操作中,相信很多人在怎么解决Mysql中的Last_SQL_Error: 1594报错问题问题上存在疑惑,小...
    99+
    2022-10-19
  • 怎么解决启动mysql时报错The server quit without updating PID file问题
    本篇内容主要讲解“怎么解决启动mysql时报错The server quit without updating PID file问题”,感兴趣的朋友不妨来看看。本文介绍的方法操...
    99+
    2022-10-19
  • 怎么解决MySQL中的ERROR 2002(HY000)报错问题
    本篇内容主要讲解“怎么解决MySQL中的ERROR 2002(HY000)报错问题”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么解决MySQL中的ERROR...
    99+
    2022-10-19
  • 怎么解决mysql中的innobackupex: Error: no报错问题
    本篇内容主要讲解“怎么解决mysql中的innobackupex: Error: no报错问题”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么解决mysql中...
    99+
    2022-10-19
  • 怎么解决mysql中的ERROR 1135 (HY000)报错问题
    这篇文章主要讲解了“怎么解决mysql中的ERROR 1135 (HY000)报错问题”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么解决mysql中的E...
    99+
    2022-10-19
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作