Tuesday, 2 February 2016

How to Flush a Slow Query Log in MySQLIn Feburary 2016 02,

In Feburary 2016 02,
Connect to a remote MySQL server through SSH, or open a terminal window if you are located with the physical server.
Type “cd mysql-data-directory” at the command prompt, replacing mysql-data-directory with the path to the location of the mysql data files on your server. By default, the data directory is located in /var/lib/mysql .
Rename the current log files if you want to keep a copy for analysis, by typing the following at the command line.mv mysql.log mysql.old
mv mysql-slow.log mysql-slow.old
Flush the log files by typing at the command prompt:mysqladmin flush-logsMySQL closes any existing log files, and then reopens them as new files with the same names.
In Feburary 2016 02,

No comments:

Post a Comment