Mar 062011
List all the database size in MySQL
Answer:
The following command will list out all the databases size in MySQL
mysql> SELECT table_schema "Data Base Name", sum( data_length + index_length) / 1024 / 1024
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema
Output:
+--------------------+----------------------+
| Data Base Name | Data Base Size in MB |
+--------------------+----------------------+
| test | 152.59375000 |
| information_schema | 0.00781250 |
| mysql | 0.61196423 |
+--------------------+----------------------+