mysql查看被锁住的表,正在进行的进程,已经杀掉进程的方法

//查看所有进程
show processlist;
//查询是否锁表
show OPEN TABLES where In_use > 0;

//查看被锁住的 SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; //等待锁定 SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS; kill 12041

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.