1、mysql 常用到的慢的查询手段:
1.1、日志:
binlog 日志
慢查询日志
错误日志 errorlog
其他日志
2、详细参考:
SHOW GLOBAL STATUS LIKE '%Slow_queries%';
常用系统命令:
flush status
tmp_table_size
show VARIABLES like '%datadir%'
show VARIABLES like '%long_query_time%' ##记录超过这个设置时间的 都记录
show tables like '%variables%'
show processlist
select * from threads
#用户权限
show GRANTS
show WARNINGS
配置相关:
select * from sys.sys_config
show global variables like 'port' 端口
第三方工具: percona-toolkit
https://docs.percona.com/percona-toolkit/pt-online-schema-change.html || https://www.percona.com/percona-toolkit
mysql监控工具:
https://pmmdemo.percona.com/graph/d/pmm-home/home-dashboard?orgId=1&refresh=1m
grafana