MySQL查看当前运行的事务和执行的账户

 

 

-- 查看当前运行的事务,这点在变更表结构之前必须要查看
select
* from information_schema.innodb_trx;
-- 查看当前运行的事务的账户和事务开始的时间,及其事务语句
select a.id,a.user,a.host,b.trx_started,b.trx_query from information_schema.processlist a right outer join information_schema.innodb_trx b on a.id = b.trx_mysql_thread_id;

 

遇到问题,不定期更新!!!

posted @ 2017-12-13 10:07  宝山方圆  阅读(7708)  评论(0)    收藏  举报