First, the environment
Os:centos Release 5.8 (64-bit)
db:mysql5.5.17
Second, the operation
Delete the slow query log directly from the command rm-f
Third, problems arise
Slow query log is not automatically generated, (if there is a backup, copy back again is not good to make)
Iv. Methods of Solution
Administrator Login mysql execute command flush logs;
If, after execution, the prompt execution succeeds and the slow query log is not actually generated, execute the following command (slow query is turned off and then on)
SET GLOBAL log_slow_queries = off; (Turn slow query off)
SET GLOBAL log_slow_queries = on; (Re-open slow query)
Problem solving, ok!
V. RECOMMENDATIONS
If you encounter a slow query log file is too large, need to reclaim space to take advantage of, or other reasons need to delete slow query log files, we recommend that you do not directly RM slow query log file, you can empty the log file,
such as: >mysql-slow.log