日期:2024-07-24 浏览次数:53 次
SHOW PROCESSLIST;
SELECT * FROM information_schema.innodb_locks;
SELECT * FROM information_schema.innodb_lock_waits;
SELECT * FROM information_schema.innodb_trx;
select * from information_schema.INNODB_TRX;
SHOW OPEN TABLES WHERE `Table` = 're_inspect_land';
SHOW PROCESSLIST;
KILL 93454;
KILL 93458;
KILL 93470;
USE information_schema;
查询事务
SELECT
a.ID AS ProcessID,
a.USER AS User,
a.HOST AS Host,
b.trx_id AS TransactionID,
b.trx_started AS TransactionStarted,
b.trx_query AS TransactionQuery
FROM
information_schema.PROCESSLIST a
RIGHT OUTER JOIN
information_schema.INNODB_TRX b
ON
a.ID = b.trx_mysql_thread_id;