# 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?
> 
> ********************************************
> This message is intended only for the use of the Addressee and
> may contain information that is PRIVILEGED and CONFIDENTIAL.
> 
> If you are not the intended recipient, you are hereby notified
> that any dissemination of this communication is strictly prohibited.
> 
> If you have received this communication in error, please erase
> all copies of the message and its attachments and notify us
> immediately.
> 
> Thank you.
> ********************************************
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to