mysql> SELECT table_schema "数据库", sum( data_length + index_length ) / 1024 /
1024 "大小(MB)" FROM information_schema.TABLES GROUP BY table_schema ;
+--------------------+---------------+
| 数据库 | 大小(MB) |
+--------------------+---------------+
| information_schema | 0.00781250 |
| mysql | 0.58952236 |
+--------------------+---------------+
1024 "大小(MB)" FROM information_schema.TABLES GROUP BY table_schema ;
+--------------------+---------------+
| 数据库 | 大小(MB) |
+--------------------+---------------+
| information_schema | 0.00781250 |
| mysql | 0.58952236 |
+--------------------+---------------+