Chris Robinson <crobinson@stripped> wrote on 06/29/2005
> Hi all,
> I have a program that uses MySQL as a backend database. I get a large
> amount of bin files in the MySQL data directory called
> where x is a number that increments.
> How do I stop these files being created? They take up a LOT of room
> one is about 1Gb). I found out how to purge them, which I'm currently
> doing manually:
> mysql -u root -p XXXXXXX -e "PURGE MASTER LOGS TO 'servername-bin.10';"
> I don't want to have to keep doing this manually though, I'd rather they
> weren't created in the first place. I'm running MySQL 4.0.17 on Windows
> 2000 server.
> Thanks in advance,
As you have discovered, those BIN files are the binlogs used for
replication. If you are not replicating, you can disable binlogging by
changing your my.ini file. If you ARE replicating, then you need to
periodically RESET MASTER or PURGE MASTER LOGS to clear out the old logs
(as you are already doing) as those files are necessary for the proper
operation of replication.
Unimin Corporation - Spruce Pine