You are here

MySQL Replication Slave with corrupt Relay Logs

Hello all,

MySQL Replication Slave stuck because its disk run full. After restarting the Slave MySQL replication was broken with the following 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.

How can I fix this? My Master is 800 Gbyte and it will take ages to set-up a new Slave from scratch...

Taxonomy upgrade extras: 

Hi Oli,

in your case possibly the reason of your MySQL Replication Relay Log corruption was the disk full state and not a problem on the master.

Please first free disk space, then you can stop the MySQL Slave and point it to the location where the SQL Thread was writing to when the disk went full with:

CHANGE MASTER TO master_log_file='...', master_log_pos=...;

Those values you get from SHOW SLAVE STATUS\G

Relay_Master_Log_File: binary-log.000042
Exec_Master_Log_Pos: 584

After starting the MySQL Slave again it should catch up as long as the MySQL Binary Logs are still available on the Master. Otherwise you have to apply them manually to the MySQL Slave...

Best Regards,
shinguz

Shinguzcomment