【问题排查】Mysql占用CPU过高
1、查询mysql当前线程
show full processlist
# 或者
select id, user, host,db, command, time, state, info
from information_schema.processlist
order by time desc;
2、time过长会导致CPU的占用
3、如果出现event_scheduler表示:mysql开启了事件调度功能,时间长了也会导致数据库CPU占用过高
4、关闭时间调度
set GLOBAL event_scheduler=OFF;
5、kill掉Time比较长的线程
kill 对应的id
评论区