The action that mysql takes when the mysql>Flush Logs command is given closes and then reopens the slow query and general logs.
To start a new log you will want to rename the current log file then perform a mysql>Flush Logs. MySQL will create a new log file with whatever you have set as the log-slow-queries= slow_queries
On windows you would roughly perform:
c:\>cd mysql-data-directoryThe same goes for the general log file. The only assumption made in this article is that you are actually already logging slow queries via your my.ini config option of log-slow-queries= slow_queries
d:\db\data>ren slow_queries slow-queries-old
d:\db\data>mysql -u user -pPassword
mysql>flush logs;
mysql>exit;
No comments:
Post a Comment