Basically, MySQL is looking in the mysql-bin.index
file and it cannot find the log files that are listed within the index. This will keep MySQL from starting, but the fix is quick and easy. You have two options:
Edit the index file You can edit the
mysql-bin.index
file in a text editor of your choice and remove the references to any logs which don’t exist on the filesystem any longer. Once you’re done, save the index file and start MySQL.Take away the index file Move or delete the index file and start MySQL. This will cause MySQL to reset its binary log numbering scheme, so if this is important to you, you may want to choose the previous option.
So how do you prevent this from happening? Use the PURGE MASTER LOGS statement and allow MySQL
to delete its logs on its own terms. If you’re concerned about log files piling up, adjust the expire_logs_days variable in your /etc/my.cnf.