mysql常用命令查看表详情查看锁服务器状态
show table status from db_name;
show table status from db_name like 'db_name'\G;
show table status from db_name like 'db_name%'\G;
select * from information_schema.tables where table_schema='mysql' and table_name='table_name'\G;
查看锁
show full processlist;
show open tables from db_name;
show open tables where in_use > 0;
lock table table_name write;
show engine innodb status\G;
show status like '%lock%';
select * from information_schema.innodb_locks;
select * from information_schema.innodb_lock_waits;
select * from information_schema.innodb_trx;
mysqladmin -uroot -p123456 -hlocalhost status
查看临时表
show status like '%tmp%';