This morning I got a notification that mysqld was consuming on average 35% of the CPU on one my servers. This was strange because this particular server doesn’t even use MySQL regularly. It’s there only to serve a rarely used legacy table. A quick look with “show processlist” confirmed that there were no queries running. After a bit of search, I found the solution here:
The solution is to run a short script that sets the correct time. Basically, the cause was the leapsecond that was added at midnight UTC. Here is a screenshot showing when mysqld starting consuming CPU – exactly at midnight UTC.