[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: Re: About mysql log file!
From: Van <vanboers () server ! dedserius ! com>
Date: 1999-08-04 3:28:41
[Download RAW message or body]
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.
Van
--
=========================================================================
Linux rocks!!! http://www.dedserius.com
=========================================================================
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail mysql-thread9284@lists.mysql.com
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail mysql-unsubscribe@lists.mysql.com instead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic