-
show variables like 'slow_query_log';
-
SET GLOBAL slow_query_log_file = '/xxx/.../sql_log/mysql-slog.log';//如果失败,先创建文件
-
SET GLOBAL log_queries_not_using_indexes=on;
-
SET GLOBAL long_query_time=1;
show variables like 'slow_query_log';
SET GLOBAL slow_query_log_file = '/xxx/.../sql_log/mysql-slog.log';//如果失败,先创建文件
SET GLOBAL log_queries_not_using_indexes=on;
SET GLOBAL long_query_time=1;
本文标题:MySQL慢查询日志
本文链接:https://www.haomeiwen.com/subject/jkncvttx.html
网友评论