开启mysql慢查询日志
开启mysql慢查询日志,可以让我们通过慢查询日志了解耗费资源的sql语句,从而优化查询。
#mysql错误日志路径
log-error="D:/phpStudy/MySQL/log/error.log"
general-log=1
#mysql日志路径
general-log-file="D:/phpStudy/MySQL/log/mysql.log"
long_query_time=3
slow_query_log=1
#mysql慢查询日志路径
slow-query-log_file="D:/phpStudy/MySQL/log/mysql-slow.log"
评论