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

We were running out of the disk space on slave because of relay-bin files, so I stopped the mysql server, deleted the relay-bin files. changed my.cnf file to point the relay log to another location. In Slave status, I noted the 'Relay_Master_Log_File' and 'Exec_Master_Log_Position'. I used them to 'Change Master'. It doesn't work. I get at the prompt, It says Failed to open the relay-log at the old position. How Mysql is still looking at the old files, and how I can change it?


share|improve this question

You should have originally deleted the logs by issuing RESET SLAVE.

Still, if you:

  • Are happy with the consistency of the slave's data to-date.
  • You have a record of Exec_Master_Log_Position and the corresponding log filename.
  • The master still has the logs which correspond to this log position and filename.

Issue STOP SLAVE and RESET SLAVE. This will remove all replication related information from the slave including which is likely to be causing the error you see.

Use CHANGE MASTER .. to reconfigure the slave with your log position, host, username, etc.

Then kick it back up with START SLAVE.

share|improve this answer

To get it working right away, your best bet may be to : mysqldump --master-data --databases db_name > snapshot20091124.sql and scp it over to your replication slave. You can double check the log position by paging through the first few lines of the mysql dump. issue a "stop slave;" , do an import "mysql -u root -p < snapshot20091124.sql", then issue a "start slave". Replication is a sometimes needlessly complicated beast.

share|improve this answer

Try to restart your slave server to flush out the cache.

share|improve this answer

Your Answer


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