On Thu, 2002-03-21 at 13:07, Shawn McCool wrote:
> /usr/local/bin/mysql -hhostname -uusername -ppassword -e "flush logs;"

I guess I wasn't clear that I wanted old binary logs removed.  I don't
want to have to manually worry about disk space due to ever increasing
binary logs.

It seems to me FLUSH LOGS just opens a new binary log.  The old, unused
ones are still left in place.  I'm looking for a rotating set of say 4
kept.  Anything older is deleted.  Logrotate does this for Apache's logs
for example.

The RESET command seems to delete all binary logs.  I don't want them
all deleted, just very old ones.  Any ideas?  Thanks.

Flush logs did the following:

[root@nachos root]# du -h /var/lib/mysql/nachos*
4.0k    /var/lib/mysql/nachos-bin.001
700M    /var/lib/mysql/nachos-bin.002
4.0k    /var/lib/mysql/nachos-bin.003
1.1G    /var/lib/mysql/nachos-bin.004
350M    /var/lib/mysql/nachos-bin.005
4.0k    /var/lib/mysql/nachos-bin.006
189M    /var/lib/mysql/nachos-bin.007
384M    /var/lib/mysql/nachos-bin.008
4.0k    /var/lib/mysql/nachos-bin.009
1.1G    /var/lib/mysql/nachos-bin.010
289M    /var/lib/mysql/nachos-bin.011
1.1G    /var/lib/mysql/nachos-bin.012
1.1G    /var/lib/mysql/nachos-bin.013
684M    /var/lib/mysql/nachos-bin.014
4.0k    /var/lib/mysql/nachos-bin.index
332k    /var/lib/mysql/nachos-slow.log
4.0k    /var/lib/mysql/nachos.us.pason.com.pid

mysql> FLUSH LOGS;

[root@nachos root]# du -h /var/lib/mysql/nachos*
4.0k    /var/lib/mysql/nachos-bin.001
700M    /var/lib/mysql/nachos-bin.002
4.0k    /var/lib/mysql/nachos-bin.003
1.1G    /var/lib/mysql/nachos-bin.004
350M    /var/lib/mysql/nachos-bin.005
4.0k    /var/lib/mysql/nachos-bin.006
189M    /var/lib/mysql/nachos-bin.007
384M    /var/lib/mysql/nachos-bin.008
4.0k    /var/lib/mysql/nachos-bin.009
1.1G    /var/lib/mysql/nachos-bin.010
289M    /var/lib/mysql/nachos-bin.011
1.1G    /var/lib/mysql/nachos-bin.012
1.1G    /var/lib/mysql/nachos-bin.013
684M    /var/lib/mysql/nachos-bin.014
4.0k    /var/lib/mysql/nachos-bin.015
4.0k    /var/lib/mysql/nachos-bin.index
332k    /var/lib/mysql/nachos-slow.log
4.0k    /var/lib/mysql/nachos.us.pason.com.pid

-- 
Guy Davis               Phone:   (403) 301-3426       
Pason Systems           Fax:     (403) 301-3499
PGP: 65BA 484B 0B96 5F3B 4D40  DCA2 B2AE 6B5A F52B 1445

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to