How to check Mysql database size

Recently I needed to know the size of our RT3 database. So, I found this SQL to do that from Mysql shell:

SELECT table_schema "rt3", sum( data_length + index_length ) / 1024 / 1024 / 1024 "Data Base Size in GB" FROM information_schema.TABLES GROUP BY table_schema;

The result is 360GB! We have to cleanup before upgrade to RT4. Otherwise the upgrade procedure will take ages.

[via Mysql Forum]

Leave a Reply

Your email address will not be published. Required fields are marked *