List:General Discussion« Previous MessageNext Message »
From:hsv Date:April 15 2013 12:23pm
Subject:Re: error-log aging
View as plain text  
>>>> 2013/04/05 11:16 +0200, Johan De Meersman >>>>
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, as Reindl answered, but in 5.5.8 there is this:


If you flush the logs using
<file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/sql-syntax.html#flush>FLUSH
LOGS or
<file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/programs.html#mysqladmin>mysqladmin
flush-logs and
<file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/programs.html#mysqld>mysqld
is writing the error log to a file (for example, if it was started with the
<file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/server-administration.html#option_mysqld_log-error>--log-error
option), the effect is version dependent: 
    * As of MySQL 5.5.7, the server closes and reopens the log file. To rename the file,
you can do so manually before flushing. Then flushing the logs reopens a new file with
the original file name. For example, you can rename the file and create a new one using
the following commands: shell> mv host_name.err host_name.err-old
    
    shell> mysqladmin flush-logs
    
    shell> mv host_name.err-old backup-directory
    
    On Windows, use rename rather than mv. 

    * Prior to MySQL 5.5.7, the server renames the current log file with the suffix -old,
then creates a new empty log file. Be aware that a second log-flushing operation thus
causes the original error log file to be lost unless you save it under a different name.
On Windows, you cannot rename the error log while the server has it open before MySQL
5.5.7. To avoid a restart, flush the logs first to cause the server to rename the
original file and create a new one, then save the renamed file. That also works on Unix,
or you can use the commands shown earlier. 

Thread
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