閱讀628 返回首頁    go 阿裏雲 go 技術社區[雲棲]


常用mysql命令

use mysql;
show table status like 'user'\G;

----------------------------------------
mysqladmin processlist
-----------------------------

show engines

show index from table

-----------------
cd /proc/21983/

cat io

cat status

------------------------

show events;

-----------------------

show engine innodb status

------------------------------------

select 1;
select version();
select user()

----------------------------------

select * from information_schema.innodb_trx\G
select * from information_schema.innodb_locks\G
select * from information_schema.innodb_lock_waits\G

-----------------------------------------------------

   統計mysql數據庫中 innodb引擎的表各自的表的大小,數據的大小,索引的大小,行數
SELECT table_schema,table_name, table_rows, \
ROUND((data_length+index_length)/1024/1024) AS total_mb, \
ROUND(data_length/1024/1024) AS data_mb, \
ROUND(index_length/1024/1024) AS index_mb \
FROM INFORMATION_SCHEMA.TABLES WHERE engine='InnoDB';


最後更新:2017-11-12 17:34:15

  上一篇:go  mysql的alter命令用法舉例
  下一篇:go  mysql常用show status查詢狀態