3

Get database size in phpMyAdmin

It looks like phpMyAdmin doesn’t include a way to see how much space takes the MySQL database. I found that a bit weird, but hey, if phpMyAdmin doesn’t do it, let’s cut to the chase and go SQL!

The most straightforward way to get your database size from phpMyAdmin is the following SQL query:

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 ;

Originally from the MySQL forums.

3 Responses

  • March 29, 2011 at 2:52 pm

    Thanks,

    I was struggling with this!

    Joe

  • May 9, 2012 at 5:13 pm

    there is a way, go to databases then under the database list click “enable statistics”, though the method you describe is cool. i like getting my hands dirty

    • May 1, 2013 at 10:34 am

      Thanks man, enabling stats under “Databases” works (y)

Leave a Reply

2013 — Upon my shoulder

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.