https://blog.csdn.net/a510196774/article/details/101995194
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/run/mysqld/mysqld.pid
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
#打开慢查询
slow_query_log=1
#慢查询文件位置
slow_query_log_file=/home/logs/mysql/slow.log
#定义慢查询的阈值,一秒
long_query_time=1
#记录未使用索引的查询
log_queries_not_using_indexes=1
来源:
MySQL Server Logs - 醒嘞 - 博客园 (cnblogs.com)
https://www.cnblogs.com/ShanFish/p/6538455.html
标签:文件,slow,log,NO,mysqld,mysql,query,日志 From: https://www.cnblogs.com/nanahome/p/16662507.html