1 in MySQL, the default is not to turn on the slow query log function, we can use show variables like '%slow% ' to see. The results are as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/26/EA/wKiom1NuKfvDr8nqAAFYiGubJfQ397.jpg "title=" Mysql.png "alt=" Wkiom1nukfvdr8nqaafyigubjfq397.jpg "/>
Parameter Description: Log_slow_queries Indicates whether the server side turns on slow query logging, Slow_query_log indicates whether MySQL monitors full query functionality on, Slow_query_log_file represents the physical location where log files are saved.
2 Turn on Full query monitoring function. Add the following configuration information under [mysqld] in MySQL configuration file my.cnf (not specified in detail):
Log_slow_queries=on
long_query_time=1# minimum time required for full query
Slow_query_log=on
log_queries_not_using_indexes=on# records those queries that do not use an index
#slow_query_log_file =d:\xampp\mysql\data\joson-pc-slow.log
When you're done, restart the MySQL server and use show variables like '%slow% ' again. Comparing with previous results, you will find that full query logging has been enabled.
This article is from the "Luther season" blog, make sure to keep this source http://zxgascend.blog.51cto.com/7974061/1409311