开启Profiling
1 | show variables like '%profiling%'; |
执行计划
1 | explain |
查表锁
1 | show status like 'table%'; |
查行锁
1 | show status like 'innodb_row_lock%'; |
QueryCache
1 | show variables like '%query_cache%'; |
网络链接
1 | show variables like '%open_files_limit%'; |
my.cnf顺序
- /etc/my.cnf
- /etc/mysql/my.cnf
- /usr/local/mysql/etc/my.cnf
- ~/.my.cnf