Development Island


Facebook logo

Knowledge

Here you can search for answers in our knowledge base.

If you feel that any information contained here is incorrect please contact us with full details.



How to remove MySQL binary logs

Last updated: 01/03/2012 22:05:39

MySQL binary logs can be safely removed without needing to shutdown the server daemon. However care must be taken to not delete logs that have yet to be read by and MySQL slave servers if replication is being used.

Use the following command from the MySQL CLI running under a user with the "SUPER" privilege such as root.

PURGE BINARY LOGS BEFORE '2011-01-01 00:00:00';

The date in the command above is optional but is handy to make sure only the old logs that slaves have already read are deleted.

RSS 2.0 Feed