-- 查询数据库最大连接数
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