vim /etc/my.cnf

[mysqld]

slow-query-log = on # 开启慢查询功能
slow_query_log_file = /usr/local/mysql/data/slow-query.log # 慢查询日志存放路径与名称
long_query_time = 5 # 查询时间超过5s的查询语句
### log-queries-not-using-indexes = on # 列出没有使用索引的查询语句

 

相关文章:

  • 2022-02-05
  • 2021-10-23
  • 2022-12-23
  • 2021-07-29
  • 2021-11-13
  • 2021-09-16
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2021-10-03
  • 2021-06-26
  • 2022-03-07
相关资源
相似解决方案