MySQL

test

mysql-bin log files take a lot of space

Symptom and cause

Symptom: the directory /var/lib/mysql/ is taking an increasing amount of space because of the numerous “server-bin.n” or mysql-bin.00000n files stored there.

This is because /etc/mysql/my.cnf has:

log-bin=mysql-bin

Binary logging is used for data recovery and for replication with master/slave servers.

To clear those binary log files, you must first decide whether you want/need binary logging or not.

Disable binary logging

In /etc/mysql/my.cnf:
disable log-bin and related settings as below (comment out or delete):

mysql

MySQL has a top notch documentation, so whatever you are looking for, your first stop should be here: http://dev.mysql.com/doc/

https://wiki.gentoo.org/wiki/MySQL
https://wiki.gentoo.org/wiki/MySQL/Guide
http://linux.overshoot.tv/dev-db

Syndicate content