Hello MySQL-users list, We are having an issue with replication and binlog files and I was hoping that this list could shed a little light on the issue for us. We have a pair of 5.1.41-community MySQL servers. We attempted to restore from the slave server, and in the process I zeroed out the mysql-bin.index file with the echo command (I know this makes me a terrible person; in my own defense, this was effective technique for restoration on on 5.0 MySQL machines).
Now, when we run: mysql> show master status; We see +------------------+-----------+--------------+------------------+ | Fil| Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+-----------+--------------+------------------+ | mysql-bin.000121 | 429017611 | | | +------------------+-----------+--------------+------------------+ But if we run mysql> SHOW BINARY LOGS; We see Empty set (0.00 sec) And the RESET MASTER command has no effect. We saw on http://dev.mysql.com/doc/refman/5.0/en/purge-binary-logs.html Prior to MySQL 5.0.60, PURGE BINARY LOGS TO and PURGE BINARY LOGS BEFORE did not behave in the same way (and neither one behaved correctly) when binary log files listed in the .index file had been removed from the system by some other means (such as using rm on Linux). Beginning with MySQL 5.0.60, both variants of the statement fail with an error in such cases. (Bug#18199 <http://bugs.mysql.com/bug.php?id=18199> , Bug#18453 <http://bugs.mysql.com/bug.php?id=18453> ) To handle such errors, edit the .index file (which is a simple text file) manually to ensure that it lists only the binary log files that are actually present, then run again the PURGE BINARY LOGS <purge-binary-logs.html> statement that failed. However running PURGE BINARY LOGS against a file listed in the mysql-bin.index file (once this file has been updated to reflefc all of the logs contained within it's directory) still results in ERROR 1373: Target log not found in binlog index Can anyone shed some light on this issue for us? Thanks!