try

tail -n 100000 /mysql/why.log > /tmp/why.log
echo > /mysql/why.log



> -----Original Message-----
> From: Van [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 12, 2002 6:01 PM
> To: Paul DuBois
> Cc: MySQL
> Subject: Re: Irritating Discovery
> 
> 
> Paul DuBois wrote:
> > 
> > At 13:12 -0700 6/12/02, Van wrote:
> > >Greetings:
> > >
> > >Perhaps a bug, even.  After about 5 months my mysql log 
> file grew to over
> > >300MBytes and I figured I'd do something about it as follows:
> > >tail -n 100000 /mysql/why.log > /tmp/why.log && sudo mv 
> /tmp/why.log
> > >/mysql/ &&
> > >mysqladmin -u root flush-logs
> > >
> > >Unfortunately, this set the permissions of why.log as a 
> user other than mysql,
> > 
> > So what happened?  Did this command:
> > 
> > sudo mv /tmp/why.log /mysql/
> > 
> > replace your old /mysql/why.log file with one owned by root?
> 
> Yes.  Well, actually owned by user vanboers (I use sudo, not root).
> 
> > 
> > If so, I guess I wouldn't be surprised.
> > 
> > >preventing mysqld from logging queries (exactly what I'd hoped to
> > >avoid), so I:
> > >sudo chown mysql.mysql /mysql/why.log
> 
> But, this should have fixed it so mysqld could start writing 
> to it again...
> 
> > >- and -
> > >mysqladmin refresh
> > >
> 
> And, this should have written to it...
> 
> This:
> mysqladmin shutdown && /etc/rc.d/rc.mysql
> 
> shouldn't have been necessary.  See what I mean?
> 
> Van
> 
> -- 
> =================================================================
> Linux rocks!!!   http://www.dedserius.com/
> =================================================================
> 
> ---------------------------------------------------------------------
> 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
> 
> 

---------------------------------------------------------------------
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