Rod Smart | 24 Apr 2006 00:52
Picon

MySQL binlog problem

    Hello all.

    I have MySQL 5.x running and I have a binlog problem.

    1st I had the problem of the individual file size eating up my 
system HD space until I found the following command.

max_binlog_size                 = 10M

    Ok, now the binlog filesize gets to approx 10M, and it starts a new 
binlog file.

    Good, but also bad, there is no limiting I have found on the number 
of binlog files created, with 1.2G available on /var, I am getting 
enough 10M binlog files to take this to about 100% and crashing MySQL.

    Does anyone know how to limit the count of binlog files?

--

-- 

	Rod Smart
	Technical Specialist

	Rohwedder Pty. Ltd.
	53-55 Rocco Drive
	Scoresby 3179
	Victoria Australia

	Tel: +61 (0)3 9763 6455
	Fax: +61 (0)3 9763 7043
(Continue reading)

David | 24 Apr 2006 05:55
Picon

Re: MySQL binlog problem

Rod Smart wrote:
>    Hello all.
> 
>    I have MySQL 5.x running and I have a binlog problem.
> 
>    1st I had the problem of the individual file size eating up my system 
> HD space until I found the following command.
> 
> max_binlog_size                 = 10M
> 
>    Ok, now the binlog filesize gets to approx 10M, and it starts a new 
> binlog file.
> 
>    Good, but also bad, there is no limiting I have found on the number 
> of binlog files created, with 1.2G available on /var, I am getting 
> enough 10M binlog files to take this to about 100% and crashing MySQL.
> 
>    Does anyone know how to limit the count of binlog files?
> 

Hi Rod,

You need to use PURGE MASTER LOGS to accomplish this as there isn't a 
configuration parameter which you can set.

<http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html>

HIH

David
(Continue reading)

Rod Smart | 24 Apr 2006 07:08
Picon

Re: MySQL binlog problem

David wrote:

> Rod Smart wrote:
>
>>    Hello all.
>>
>>    I have MySQL 5.x running and I have a binlog problem.
>>
>>    1st I had the problem of the individual file size eating up my 
>> system HD space until I found the following command.
>>
>> max_binlog_size                 = 10M
>>
>>    Ok, now the binlog filesize gets to approx 10M, and it starts a 
>> new binlog file.
>>
>>    Good, but also bad, there is no limiting I have found on the 
>> number of binlog files created, with 1.2G available on /var, I am 
>> getting enough 10M binlog files to take this to about 100% and 
>> crashing MySQL.
>>
>>    Does anyone know how to limit the count of binlog files?
>>
>
> Hi Rod,
>
> You need to use PURGE MASTER LOGS to accomplish this as there isn't a 
> configuration parameter which you can set.
>
> <http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html>
(Continue reading)

luke | 24 Apr 2006 05:45
Picon

Re: MySQL binlog problem

Hi.

24Apr2006  <at>  08:52 Rod Smart thusly spake
>    Hello all.
> 
>    I have MySQL 5.x running and I have a binlog problem.
> 
>    1st I had the problem of the individual file size eating up my 
> system HD space until I found the following command.
> 
> max_binlog_size                 = 10M
> 
>    Ok, now the binlog filesize gets to approx 10M, and it starts a new 
> binlog file.
> 
>    Good, but also bad, there is no limiting I have found on the number 
> of binlog files created, with 1.2G available on /var, I am getting 
> enough 10M binlog files to take this to about 100% and crashing MySQL.
> 
>    Does anyone know how to limit the count of binlog files?

You can delete old ones. 
I don't keep binlogs older than a month.
Since my database gets backed up every night I could probably get rid of a lot
more.
You could setup a cron job to delete those.
IIRC they are only needed to rebuild after an emergency.
If you're not sure, put a bunch of them in a different directory, then, if you
can, restart the server and you'll see that they aren't used.

(Continue reading)


Gmane