Last_Error: Relay log read failure: Could not parse relay log event entry.

综合网上各种答案,总结一下,还是有帮助的。


Relay log corruption example:

You can get error info after SHOW SLAVE STATUS;

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.

In most cases, it should be caused by a network problem which leads to a corruption of relay log. And this problem can be fixed quite easily. So when you get error, first try this to see if it works.
1. stop the slave and get info by "SHOW SLAVE STATUS;"

2. Note down values of these two fields: "Relay_Master_Log_File","Exec_Master_Log_Pos"

For example>Relay_Master_Log_File=mysql-bin.000287>Exec_Master_Log_Pos: 972239835

3. Bypass the corrupted relay log by

mysql> CHANGE MASTER TO
mysql> MASTER_LOG_FILE='mysql-bin.000287',
mysql> MASTER_LOG_POS=972239835;
mysql> START SLAVE;

补充:主要是没有同步,MASTER_LOG_FILE,MASTER_LOG_POS设置成master上显示的值(master服务器上执行show master status;查看)。

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

参考自链接:http://www.cnblogs.com/niniwzw/archive/2010/02/04/1663685.html

你可能感兴趣的:(数据库,status,slave,show)