Thursday, March 10, 2011

Flush Logs on MySQL Without Restarting the Server

For the longest time I thought you had to stop mysql and rename the log files and then restart when on Windows.

That's definitely not the case.

Simply rename the error log file and then run this command and it will reset the error log file.  Be sure to change out the username to your username.
mysqladmin -urandy -p flush-logs