Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our Slave Server disk drive got full, replication stopped, so we cleared space off, and started replication again. Well, all was good until we ran into a corrupt relay bin file on the slave (used mysqllogbin to insure).

What do we do? Can we remove the corrupt bin file, and restart, hoping it will rebuild that file?

Little lost on what to do, any help would be great.

We are running 5.1, have a master, and a slave.

I may be missing info, or not being clear enough, if so, let me know and I can fill you in.

share|improve this question
up vote 3 down vote accepted

Record the values shown for Relay_Master_Log_File and Exec_Master_Log_Pos, which show the last position from the master's binary logs that executed successfully.

Use CHANGE MASTER to cause the slave to copy the binary log from that point on again, replacing the relay logs with fresh ones:

  -- replace those two tags with the values you recorded earlier
share|improve this answer

You can try and skip 1 record if that is corrupted. You can do this by doing:

set global sql_slave_skip_counter=1; start slave;

then do

show slave status\G

and see if its ok.

You can repeat this a few times until it starts replicating properly.

If on the other hand, you feel you lost too much data and the slaves are out of sync, then you can do a new mysqldump of the master to resync them.

Lastly, maatkit has a syncing tool that will do a checksum on both tables and will try to sync them for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.