List:General Discussion« Previous MessageNext Message »
From:Van Date:August 4 1999 3:28am
Subject:Re: About mysql log file!
View as plain text  
George wrote:
> Hello all:
>     My mysql database has very large size log file in my disk. I want to remove the
> log file when log more than 10M size.
> How to do?
> Thank you!
First, George;
Look at the date in your e-mail.  You're 2 years ago.
Not coming at you, but, I think the better approach to
truncating/archiving/otherwise managing logfiles is better viewed from a
date perspective than a size perspective.  i.e.  Archive my log to
mysql.19990731.log at the end of July.  In UNIX-speak, this is a simple
batch file like:
cat /usr/local/var/mysql.log > /backupdir/mysql.`date +%Y%m%d`.log
echo '' > /usr/local/var/mysql.log
mysqladmin -umysql -ppasswd flush-logs

And, adding the appropriate crontab entry.

Of course, if you're living in a WinNT world with MySQL, you'll need to
do some creative perl/batch programming similar to this end, and, use
WinAT, or start - cmd - at and create the respective scheduled job.

Hope that helps.

Linux rocks!!!
About mysql log file!George4 Aug
  • Re: About mysql log file!Van4 Aug
  • Re: About mysql log file!Ralph Graulich4 Aug
RE: About mysql log file!Quentin Bennett4 Aug