MySQL tip #1 How to find size of a mysql database

In order to find size of your mysql databases you can run following sql querry:


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 ; 

Divide it by further 1024 to get it in GB.

For more information read about INFORMATION_SCHEMA

One Response to “MySQL tip #1 How to find size of a mysql database”

  1. Sai Says:

    This information was very useful for me.

    Thanks
    Sai

Leave a Reply