Clean up binary logs for mysql
Some times the bin logs will occupy lots of disk space. To clean up the expired bin logs, run following query:
PURGE BINARY LOGS BEFORE '2013-01-01 0:0:0';
Change the time in the query with your preference. Better way to do this is to add expire_logs_days in my.cnf:
expire_logs_days = 10
Or run follow query if you don't want a mysql restart:
set @@global.expire_logs_days=10;
Written by Semio Zheng
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Related Tags
#mysql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#