Time to flush and reset binary logs with MySQL

Jul 4, 2012 00:00 · 62 words · 1 minute read mysql

I logged into my mysql server and figured out mysql used almost 70% of allocated space. So… time to clean flush and reset binary logs (I don’t use expire_logs_days).

$> mysql -u root -p
mysql> FLUSH LOGS;
mysql> RESET MASTER;

That’s it. After that the usage reduced to 5% of allocated space.

Another option is to use expire_logs_days option in my.cnf file.