1、查看锁表情况
SELECT * from information_schema.INNODB_TRX;
show open tables where in_use>0;
2、杀死查询到的id
kill trx_mysql_thread_id;
3、查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
4、查看等待锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;