Getting the size of your MySQL database

I recently upgraded a Drupal installation. In the process, the database has to be backed up. The DB backup seemed large to me so I wanted to check the size of the MySQL database. I found this tip on the MySQL forum from Prakash Babu.

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 ;

It worked great and confirmed the size of the backup.

Leave a Reply

You must be logged in to post a comment.

Powered by WordPress
Entries (RSS) and Comments (RSS).