mysql檢視鎖表程序

2022-07-10 09:30:18 字數 578 閱讀 2583

mysql 檢視被鎖住的表

查詢是否鎖表

show open tables where in_use > 0;

檢視所有程序

mysql: 

show processlist;

mariabd:

show full processlist;

查詢到相對應的程序===然後 kill id

殺掉指定mysql連線的程序號

kill $pid

檢視正在鎖的事務

select * from information_schema.innodb_locks;

檢視等待鎖的事務

select * from information_schema.innodb_lock_waits;

檢視innodb引擎的執行時資訊

show engine innodb status\g;

檢視造成死鎖的sql語句,分析索引情況,然後優化sql語句;

檢視伺服器狀態

show status like '%lock%';

show variables like '%timeout%';

MySQL檢視鎖表

show status like lock show status like table 在mysql5.5中,information schema 庫中增加了三個關於鎖的表 memory引擎 select from information schema innodb trx root 127.0....

mysql 檢視鎖表日誌 MYSQL 表鎖情況檢視

檢視鎖表情況 mysql show status like table variable name value table locks immediate 795505 table locks waited 0 table open cache hits 0 table open cache mis...

二 oracle檢視鎖表程序

oracle 檢視鎖表程序,殺掉鎖表程序2008 10 22 16 01 檢視鎖表程序sql 語句1 itpub 個人空間 af e l 3kf i z select sess.sid,itpub 個人空間 n3 1u q sess.serial itpub 個人空間1sr z1 e g so x ...