1、查询是否锁表
show OPEN TABLES where In_use > 0;
2、查询进程
show full processlist;
查询到相对应的进程===然后 kill id
补充:
查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
查看等待锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
随便看看
文章排行
本栏推荐
栏目更新
Copyright 2020 Inc. AllRights Reserved. Design by mysql 查询表死锁 和结束死锁的表步骤