List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:April 5 2013 9:31am
Subject:Re: error-log aging
View as plain text  

Am 05.04.2013 11:16, schrieb Johan De Meersman:
> ----- Original Message -----
>> From: hsv@stripped
>> Subject: Re: error-log aging
>> man logrotate
>> <<<<<<<<
>> Not Unix!
> So get unix :-)
>> In any case, I take this to mean that this is not done within MySQL,
>> right?
> Half and half - rename the file, then issue "flush logs" in mysql to close and reopen
> the logs, which will cause a new log with the configured name to be created.
> That being said, I'm not much aware of Windows' idiosyncracies - I hope the damn
> thing allows you to rename a file that's being held open by a program. If not, well... see
> above.

no, windows does not allow this

but what also will work without touch mysqld is copy the existing file and empty it
on Unix "> /path/mysqld.log" would do this, on windows maybe redirect echo of a empty
string to the file, at least "whatever > /path/file.ext" works on windows too

i am working this way since years with apache accesslogs to empty them at the
begin of each month EXACTLY after webalizer has proceeded the accesslog from
the specific vhost which is all controlled by a bash-script generated by a
PHP script with access to the config-data :-)

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
error-log aginghsv4 Apr
  • Re: error-log agingReindl Harald4 Apr
    • Re: error-log aginghsv4 Apr
      • Re: error-log agingJohan De Meersman5 Apr
        • Re: error-log agingReindl Harald5 Apr
        • Re: error-log aginghsv15 Apr