阅读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查询状态