|
在/etc/my.cnf 添加 了log-slow-queries=[file_name]
查看log-slow文件是否是打开状态
mysql> show variables like '%slow%';
+---------------------+------------------------+
| Variable_name | Value |
+---------------------+------------------------+
| log_slow_queries | ON |
| slow_launch_time | 2 |
| slow_query_log | ON |
| slow_query_log_file | /db/mysql_log/slow-log |
要查看 log_slow时显示一下:
[root@localhost ~]# mysqlsla -lt slow /db/mysql_log/slow-log
Report for slow logs: /db/mysql_log/slow-log
0 queries total, 0 unique
Sorted by 't_sum'
Grand Totals: Time 0 s, Lock 0 s, Rows sent 0, Rows Examined 0 |
|