统计每个DB的磁盘空间使用
mysql> select table_schema "DB name (table_schema)",
-> sum((data_length+index_length)/1024/1024/1024) AS "DB size in GB" from
-> information_schema.tables group by table_schema;
+-----------------------------+-------------------+
| DB name (table_schema) | DB size in GB |
+-----------------------------+-------------------+
| information_schema | 0.000167846679 |
| xxyyzz_coins_v3_db_00000004 | 210.166442871299 |
| xxyyzz_coins_v3_db_00000004 | 1387.163970947461 |
+-----------------------------+-------------------+
3 rows in set (0.85 sec)