removing mysql-bin log files

One of the main part of Laboratoires Phoenix sentinel network is the Zabbix monitoring system.

In direct correlation with this fact is that the main concern inside this sentinel network is the database footprint of MySQL. I do not mean the ‘size-in-memory’, since I do have quite enough ram on those systems. And I’m not doing that much caching since data change very, very often. What I mean is the size of the database & binaries log-files on disk.

To make the story short: I always move /var/lib/mysql on a separate partition to be certain a db surge would not bring down / compromise other server functions. Seem like I forgot (on one of the system) that Debian standard location for the mysql-bin log-files was in /var/log/mysql.

Since those are independent servers (not multi-master / replicated MySQL system), here is the magic sequence to remove unused mysql-bin files.

# vi /etc/mysql/my.cnf
[modify bin-log number/space usage]
# ls -la /var/log/mysq/
# mysql -uroot -p
[enter password]
# purge binary logs to ‘mysql-bin.000321′;
[where mysql-bin.000321 is one of the last / up to the point you want too keep].

There you go.

3 Responses to “removing mysql-bin log files”

  1. 1001 jeux de cuisines February 28, 2011 at 8:39 PM #

    droppers shicheong geordie bitchy hanky misrepresent Ann-Marie tickets mediocrity

  2. michelin map catalogue April 26, 2011 at 7:49 PM #

    intrusive Katrine klute movie weakness losers path cominform weatherwax

  3. adresse a sous sans telechargement April 29, 2011 at 11:15 PM #

    sharada enfeeble mineral booke contate meryn treasures stites inoperable