mysql 1594_主从问题修复: 1594-Relay log read failure: Could not parse relay log event entry

# 主从问题修复: 1594-Relay log read failure: Could not parse relay log event entry

``` mysql

mysql> show slave status \G

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

Slave_IO_State: Waiting for master to send event

Master_Host: 114.114.114.114

Master_User: slave_name

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000004

Read_Master_Log_Pos: 1047307276

Relay_Log_File: b58bfa7a2006-relay-bin.000005

Relay_Log_Pos: 243447410

Relay_Master_Log_File: mysql-bin.000003

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

Relay_Log_Space: 2121053196

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.

Replicate_Ignore_Server_Ids:

Master_Server_Id: 2

Master_UUID: c57133d0-0b7f-11ea-82a2-0242ac110008

Master_Info_File: /var/lib/mysql/master.info

SQL_Delay: 1800

SQL_Remaining_Delay: NULL

Slave_SQL_Running_State:

Master_Retry_Count: 86400

Master_Bind:

Last_IO_Error_Timestamp:

Last_SQL_Error_Timestamp: 200622 15:55:46

Master_SSL_Crl:

Master_SSL_Crlpath:

Retrieved_Gtid_Set: c57133d0-0b7f-11ea-82a2-0242ac110008:4-882,

f0d62353-6723-11e9-91d6-0242ac110003:498066-5575880

Executed_Gtid_Set: a8bf000e-b1c4-11ea-8fb4-0242ac110009:1-7875,

c57133d0-0b7f-11ea-82a2-0242ac110008:1-3,

f0d62353-6723-11e9-91d6-0242ac110003:25-2287668

Auto_Position: 0

Replicate_Rewrite_DB:

Channel_Name:

Master_TLS_Version:

1 row in set (0.00 sec)

```

查看日志,猜测可能是relay-log日志损坏, 记录下 `Relay_Master_Log_File` 和 `Exec_Master_Log_Pos`, 尝试重新设置主从

具体操作步骤如下:

``` mysql

mysql> stop slave ;

Query OK, 0 rows affected (0.00 sec)

mysql> reset slave all;

Query OK, 0 rows affected (0.15 sec)

mysql> change master to master_host='114.114.114.114',master_port=3306,master_user='slave_name',master_password='yourspassword',master_log_file='mysql-bin.000003',master_log_pos=243447237;

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

mysql> start slave;

Query OK, 0 rows affected (0.01 sec)

```

参考文章:

[https://blog.csdn.net/shaochenshuo/article/details/60574721](https://blog.csdn.net/shaochenshuo/article/details/60574721)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值