Getting the size of your MySQL database
2008 Oct 9th @ 09:05:18
No Comments »
Categories
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.
