Odd MySQL Problem using 100% CPU with Nothing Running

For some reason, MySQL (5.5.15) on my home server (running kernel 2.6.32-220.17.1.el6.x86_64) was using all my CPU:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10949 mysql 20 0 804m 53m 5868 S 125.8 1.6 415:09.88 mysqld

There was nothing running on MySQL.

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+------+---------+------+-------+------------------+
| 36 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)

My disk wasn’t full.

[root@nas leo]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 51606140 22222600 26762100 46% /

I tried restarting MySQL a few times, but it continued to use up all the CPU immediately after starting. After scratching my head and not wanting to waste any more time, I simply rebooted the machine and everything was back to normal again.

Documenting this in case someone else has ran into the same problem and possibly has a fix/

Leave a Reply

Your email address will not be published.