关于mysql 8.0版本追踪死锁的方法
2020-01-21 本文已影响0人
灰纸黑字
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%';
-- 上方有些语句是重复的,我也是四处收集来的,用来以后遇到问题使用,假设您有用到,且有不明白的地方可以留言。