– 查看正在执行的进程
show processlist;
SELECT * FROM information_schema.PROCESSLIST p;
– 查询正在加锁的表
show OPEN TABLES where In_use > 0;
– 查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
– 查看等待锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
– 查看MYSQL定义的事件是否开启
show VARIABLES like ‘event%’;
SET GLOBAL event_scheduler = ON;
SQL查看锁
最新推荐文章于 2024-07-06 08:00:00 发布