List:General Discussion« Previous MessageNext Message »
From:Dan Buettner Date:October 18 2006 7:27pm
Subject:Re: bin-log with expire_logs_days
View as plain text  
I haven't used the server variable you refer to, but instead have
always used an external command piped in via cron - PURGE BINARY LOGS
BEFORE <date>
and I just use a DATE_SUB function to subtract X days from today's date.
http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html

It's a pretty quick command to run, generally a fraction of a second.
Since you have 132 files it might be a few seconds but I would not
expect longer than that.

I don't know whether MySQL willl go back and delete the old logs if
you set that variable and restart - presumably it would, but not
certain.

Dan



On 10/18/06, George Law <glaw@stripped> wrote:
> Hi All,
>
> I have a **high traffic** mysql 4.0.18-standard-log server running with
> bin-logging enabled.
>
> Right now, this must be using a default setting for expire_log_days.  I
> do not see this anyway in
> "show variables" or "show status"
>
>
> $ echo "show variables" | sql |grep bin
> binlog_cache_size       32768
> log_bin ON
> max_binlog_cache_size   4294967295
> max_binlog_size 1073741824
>
>
> # echo "show status" | sql |grep bin
> Com_show_binlog_events  0
> Com_show_binlogs        9
>
> Right now, I have 132 bin-logs, each at 1 GB. the logs go back to
> 2/11/2006
>
> If I were to add 'expire_logs_days 45' to my.cnf and restart mysql, is
> mysql going to attempt to purge the logs
> > 45 days old and if so... how long does it typically take.  We cannot
> afford to restart if its going to take
> any significant amount of time for it to purge the logs and restart.
>
> thanks!
>
>
> George Law
> glaw@stripped
> MSN: george-ion@stripped
> Phone: 864-678-3161
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
bin-log with expire_logs_daysGeorge Law18 Oct
  • Re: bin-log with expire_logs_daysDan Buettner18 Oct
    • RE: bin-log with expire_logs_daysGeorge Law19 Oct
  • Re: bin-log with expire_logs_daysVisolve DB Team19 Oct