12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-28 13:24:19
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
进入information_schema 数据库(存放了其他的数据库的信息)mysql> use information_schemaReading table information for completion of table and column namesYou can turn
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
进入information_schema 数据库(存放了其他的数据库的信息)
mysql> use information_schema
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
第一种情况:查询所有数据库的总大小,方法如下:
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES;
+-----------+
| data |
+-----------+
| 3052.76MB |
+-----------+
1 row in set (0.02 sec)
第二种情况:查看指定数据库的大小,比如说:数据库test,方法如下:
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='test';
+----------+
| data |
+----------+
| 142.84MB |
+----------+
1 row in set (0.00 sec)
第三种:查看指定数据库的表的大小,比如说:数据库test中f_apply表,方法如下:
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='ixinnuo_financial' and table_name='f_apply';
+--------+
| data|
+--------+
| 0.08MB |
+--------+
1 row in set (0.00 sec)
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19