>>>> 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
No, as Reindl answered, but in 5.5.8 there is this:
If you flush the logs using
is writing the error log to a file (for example, if it was started with the
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.