2.如何发现关键字
mysql> show variables like '%log%';
结果:
| log_slow_queries ON
| slow_query_log ON
| slow_query_log_file C:\ProgramData\MySQL\MySQL Server 5.5\Data\Macrotea-PC-slow.log
3.修改 my.ini
[mysqld] log_slow_queries=ON long_query_time=2 slow_query_log=ON log_queries_not_using_indexes=ON slow_query_log_file=E:/Application/Category/Java/_ISCAS/SIE/slow-query.log # The TCP/IP Port the MySQL Server will listen on port=3306