Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Mar 062011

List all the database size in MySQL


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 


| Data Base Name     | Data Base Size in MB |
| test               |         152.59375000 |
| information_schema |           0.00781250 |
| mysql              |           0.61196423 |

  One Response to “List all the database size in MySQL”

  1. [...] previous article, we have already discussed how to list the database size in your MySQL [...]

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>