查询是否锁表

show OPEN TABLES where In_use > 0;

查看所有进程

show processlist;

杀掉指定mysql连接的进程号

kill $pid

查看正在锁的事务

SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;

查看等待锁的事务

SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;

查看服务器状态

show status like '%lock%';

查看超时时间

show variables like '%timeout%';


Source: https://www.bigran.cn/article/bK97z3wV.html

Leave a comment

Published

2019-09-25 10:44:21


Categories


Tags

友情链接

分享代码