Moving Mysql binary logs

In connection with the disc space problem of the binary logs, I found it was dead easy to put them on a different partition.

In /etc/mysql/my.cnf there is a line

log-bin

just change this to

log-bin = /newdirectory

Then just restart mysql.

You might want to purge the old logs first, by connecting to your database and running:

purge master logs to '.000001';

Just how simple is that!

This entry was posted in trivial shennanigans and tagged . Bookmark the permalink.