美文网首页
关于mysql 8.0版本追踪死锁的方法

关于mysql 8.0版本追踪死锁的方法

作者: 灰纸黑字 | 来源:发表于2020-01-21 16:19 被阅读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%';

-- 上方有些语句是重复的,我也是四处收集来的,用来以后遇到问题使用,假设您有用到,且有不明白的地方可以留言。

相关文章

网友评论

      本文标题:关于mysql 8.0版本追踪死锁的方法

      本文链接:https://www.haomeiwen.com/subject/hmjtpqtx.html