MySQL 8.0 死锁诊断

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%';

 

你可能感兴趣的:(MySQL)