Am 05.04.2013 11:16, schrieb Johan De Meersman:
> ----- Original Message -----
>> From: h...@tbbs.net
>> 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: signature.asc
Description: OpenPGP digital signature

Reply via email to