[mythtv-users] MySQL log files growing alarmingly

James Hood jimmycap at gmail.com
Sat Jan 27 15:54:55 UTC 2007

Those log files have to do with MySQL being set as a master for replication.
They contain a sort-of transaction log of every statement run on the server
that changes data. You can instruct MySQL to remove them, use a system
variable to control how long they stay around, or use mysqldump to backup
the database and then clear them.


Look for --delete-master-logs 

I stumbled upon this (after my /var partition filled up b/c of these bin
files) and have since added a cron that backs up the entire database and
then deletes the bin files.

Since then, they haven't been an issue. As a bonus, it provides a handy way
to recover nearly everything in the event of database corruption (Restore
from last backup, then execute all statements in these bin logs).


-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Rod Smith
Sent: Friday, January 26, 2007 11:10 PM
To: Discussion about mythtv
Subject: [mythtv-users] MySQL log files growing alarmingly


I set up a MythTV system about a week ago and I've discovered that my MySQL
log files are growing at an alarming rate. I know next to nothing about
MySQL, and the log files in question don't look like ordinary log files, so
I'm reluctant to mess with them without guidance. I'm running Ubuntu 6.10
with the MythTV 0.20 and MySQL packages that came with it. The log files
appear in /var/log/mysql and are called mysql-bin.000001 and up (to
mysql-bin.000047 at the moment). In total, the /var/log/mysql directory is
now 270MB in size (on a 1GB partition), and I don't see any rules in the
Ubuntu log file rotation configuration to touch these files, although there
are rules to handle other (so far much smaller) MySQL log files.

So, any advice on this? (A pointer to a Web page would be fine, provided it
assumes little or no knowledge of MySQL.) Can these files be rotated by
logrotate, or is there some better way to handle it?

Thanks for any pointers.

Rod Smith
mythtv-users mailing list
mythtv-users at mythtv.org

More information about the mythtv-users mailing list