Why is MySQL making the CPU run at about 80%?

MySQL is eating up about 80% of my CPU for no reason as far as I can see. Right now this server is rarely used, more of a test site I set up that will eventually be a used for production once I fix small problems like this. I run 3 instances of MySQL but it seems that my first instance is taking up all the CPU. When I turn off the first instance and leave the other two on everything runs fine.

Any suggestions?

I tried Show Processlist and no statements are being run besides "Sleep" and the query "Show Processlist" (obviously) at the time it's using up all this CPU.

my.cnf is basic. I did not optimize or change any MySQL settings. Do you think this would cause such strange behavior?

The machine is running Linux Centos 5.7 64 bit and MySQL 5.0.95.

Thanks


Solution 1:

Make sure you use an account with administrator permissions when you check for running queries on MySQL. Typically you'll only see your own queries. If some other system process is toying around in the background on MySQL, it might not be obvious.

Consider also atop to see related disk activity and innotop.