get table size in megabytes, MySQL

Here’s an awesome snippet of code that I got from Thomas Eisenbarth at

SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)` FROM information_schema.TABLES WHERE table_schema = "$your_database";

Basically, it will display all the tables in a database with disk usage in the next column. All you to do is change $your_database to the actual name of a database on your MySQL server.

Be sure to thank Thomas Eisenbarth by when you click on his link.