Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if there is a copy 1594 error in MySQL

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you what to do when there is a copy 1594 error in MySQL, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.

Phenomenon:

Mysql > show slave status\ G

* * 1. Row *

Master_Log_File: mysql-bin.000191

Read_Master_Log_Pos: 334164088

Relay_Log_File: mysql-srelay.000533

Relay_Log_Pos: 902042386

Relay_Master_Log_File: mysql-bin.000190

Slave_IO_Running: Yes

Slave_SQL_Running: No

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.

Error_log is as follows:

160519 18:42:21 [ERROR] Error reading relay log event: Could not open log file

160519 18:42:21 [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 abl

E to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594

160519 18:42:21 [ERROR] Slave (additional info): File'/ data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29

160519 18:42:21 [Warning] Slave: File'/ data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29

160519 18:42:21 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.009095' position 1069989357

Parsing:

From the log, we can see that it may be the binlog damage of master or slave or network problems.

But the network test is normal.

Then stop slave found that the binlog on the main library continued to increase, and no error_log was generated.

As a result, it is suspected that the relay binlog damage from the library

Resolve:

Now that the cause has been found out, it is relatively easy to solve it.

1. Execute reset slave from the library to clear the binlog log

two。 Start replication from where it was before the error

The replication location for this example is:

'mysql-bin.009095' position 1069989357

The above is all the contents of the article "what to do if there is a copy 1594 error in MySQL". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report