mysql 5.6.30 开启慢查询日志的方法,和老版本不同
[ 2017-08-23 09:46:08 | 作者: admin ]
1,修改配置文件(需重启mysqld服务):
【windows】开启所有日志
【linux】开启慢查询
[root@localhost app]# cat /etc/my.cnf
...
阅读全文…
【windows】开启所有日志
log-error="D:/Program Files/MySQL/MySQL Server 5.6/logs/error.log"
general-log=1
general-log-file="D:/Program Files/MySQL/MySQL Server 5.6/logs/query.log"
slow_query_log=on
slow_query_log_file="D:/Program Files/MySQL/MySQL Server 5.6/logs/slow.log"
long_query_time=2
general-log=1
general-log-file="D:/Program Files/MySQL/MySQL Server 5.6/logs/query.log"
slow_query_log=on
slow_query_log_file="D:/Program Files/MySQL/MySQL Server 5.6/logs/slow.log"
long_query_time=2
【linux】开启慢查询
[root@localhost app]# cat /etc/my.cnf
...
阅读全文…
1