Linux下开启MySQL慢查询日志
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
1、修改 mysql 的配置文件 my.cnf:
2、在 [mysqld] 中添加内容:
slow_query_log=TRUE #开启慢日志
slow_query_log_file=/var/log/mysql/mysql-slow.log #日志存放位置
long_query_time=5 #超时时间5秒(超过5秒就会被记录下来)
3、登录 mysql 客户端,查看 slow_query_log 变量:
show variables like '%quer%';
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:23 天前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献11条内容
所有评论(0)