Last week one of our database servers notified me that the main OS drive had less then 5% storage space. I loaded up one of my favorite tools, Grand Perspective to see what was taking up so much space. Sure enough, I had about 5-6GBs of space left, and there were about 20-25 files each 1-2GBs in-size. Each file was a log file for MySQL. These were each binary log files.
Following the same article on the MySQL website, I found out that it was possible to delete the log files without screwing anything up. Running the
PURGE BINARY LOGS did so. Now it is possible to set log sizes, but since I really have no use for them I just stopped the logging all together.
You can do this by editing the following file:
Locate the following lines and then comment it out.
# Replication Master Server (default) # binary logging is required for replication #log-bin=mysql-bin