1.查询是否锁表
show OPEN TABLES WHERE In_use > 0
2.查看进程
show processlist
3.查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS
4.查看等到锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS
查看线程死锁mysql
最新推荐文章于 2024-08-18 21:36:31 发布
1.查询是否锁表
show OPEN TABLES WHERE In_use > 0
2.查看进程
show processlist
3.查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS
4.查看等到锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS