> -----Original Message----- > From: Pete Harlan [mailto:[EMAIL PROTECTED] > Sent: Friday, April 27, 2007 5:15 PM > To: Tim Lucia > Cc: mysql@lists.mysql.com > Subject: Re: My bin.log directory is getting full > > Perhaps the "expire_logs_days" variable does what you're looking for.
If you google for expire_log_days you will find many threads on many forums asking "Why doesn't this work?" and saying "We wound up creating a cron job instead." When I read that, I opted just to go with the cron job. Plus I get a nice little email with the output showing me which log(s) are available and which have been purged, I can control the exact date and time that the command runs, coordinate with other maintenance scripts, etc. Tim > --Pete > > On Thu, Apr 26, 2007 at 09:01:58PM -0400, Tim Lucia wrote: > > # cat /etc/cron.mysql/20-purgemasterlogs > > #!/bin/sh > > /usr/bin/mysql --defaults-file=/root/.my.cnf -e 'show master logs; purge > > master logs before date_sub(now(), interval 30 day); show master logs;' > > >/var/log/20-purgemasterlogs.log 2>&1 > > > > This purges anything older than 30 days. > > > > HTH, > > Tim > > > > > -----Original Message----- > > > From: Brown, Charles [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, April 26, 2007 12:03 PM > > > To: mysql@lists.mysql.com > > > Subject: My bin.log directory is getting full > > > > > > Hello All. My bin.log directory is getting full with bin.log files. We > > > are running out of space. What can I do in the short term? Is there a > > > command that I can issue that will get rid of old bin log files not > > > needed? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]