How to diagnose slow mysql performance

If you're experiencing slow mysql performance--top showing mysqld high cpu usage. This command will help you track down what's going on at that specific time.

mysql -e "show processlist"

Of course you should also check your log files:


You'll also want to optimize your /etc/my.cnf: For a pretty good quick start, you can use this tool, Percona Configuration Wizard for MySQL

Tags: mysql Server Linux