获取当前阻塞事件
select d.trx_started, a.thread_id, b.processlist_id, a.SQL_text
from performance_schema.events_statements_current ajoin performance_schema.threads b on a.thread_id = b.thread_idjoin information_schema.processlist c on b.processlist_id = c.idjoin information_schema.innodb_trx d on c.id = d.trx_mysql_thread_id
order by d.trx_started;
查一下这些阻塞的语句,判断哪个是所阻塞的表相关的。
执行:kill processlist_id
例如:kill 3076964