#1.查看所有数据大小
#1.查询所有数据的大小
mysql> use information_schema;
mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;
+---------+
| data |
+---------+
| 51.27MB |
+---------+
1 row in set (0.01 sec)
#2.查看指定数据库的大小
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
mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='world';
+--------+
| data |
+--------+
| 0.58MB |
+--------+
1 row in set (0.00 sec)
#3.查看指定数据库的某个表的大小
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
mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='world' and table_name='city';
+--------+
| data |
+--------+
| 0.39MB |
+--------+
1 row in set (0.00 sec)
标签:1024,查看,MB,mysql,+--------+,Mysql,大小,table,data From: https://www.cnblogs.com/linuxmysql/p/16632597.html