SHOW ENGINE INNODB STATUS;
show open tables where in_use>0;
show full processlist;
select * from information_schema.innodb_trx;
show open tables where in_use>0;
select * from information_schema.PROCESSLIST p where p.state<>'';
select * from sys.innodb_lock_waits;
select * from sys.schema_table_lock_waits;
select * from information_schema.TABLES t where t.TABLE_SCHEMA='SYS' and t.table_name like '%lock%';
-- 上方有些语句是重复的,我也是四处收集来的,用来以后遇到问题使用,假设您有用到,且有不明白的地方可以留言。