数据库锁表问题

-- 查询数据库最大连接数

show variables like "max_connections";
-- 
show full processlist;

show processlist;


select *from performance_schema.events_statements_current;

-- 查询上锁的语句
SELECT * FROM information_schema.innodb_trx;

-- 锁等待查询
select * from information_schema.innodb_lock_waits G;

select * from information_schema.innodb_locks G;

找到锁表的语句直接kill掉该进程ID

posted on 2019-07-07 10:41  鑫春  阅读(389)  评论(0编辑  收藏  举报

导航