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.
Thanks,
I was struggling with this!
Joe
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
Thanks man, enabling stats under “Databases” works (y)
Thanks man, it just work like a charm. But there is another way, you can take a dump of your DB and then can check the .sql file size . LOL
Great!! Awesome :-) many thanks
Great!! Awesome :-) many thanks
Works like a charm! Awesome! Many thanks :)
How to check size of each table
SELECT table_name AS “Table”,
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS “Size (MB)”
FROM information_schema.TABLES
WHERE table_schema = “database_name”
ORDER BY (data_length + index_length) DESC;
Great, thanks man!
Ah! I ran into an issue today of my own mysql db being overloaded and turned read-only by OVH. Apparently newer versions of phpMyAdmin show the table size in the table list, meaning the technique this article is not all that useful anymore. :)
Very useful information. Thanks a lot!!!
thank you, thank you, thank you