MySQL Forums
Forum List  »  MySQL Query Browser

GET THE DATABASE SIZE FROM THE MYSQL QUERY BROWSER
Posted by: Prakash Babu
Date: March 20, 2008 12:18AM

Run the below query you can get the Data Base Size in MySQL.

If you run the query which is given below in MySQL Query Browser then you will get the two columns first will display the Data Base Name and the second will display the Data Base Size in MB.

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 ;

If you have question in your mind like "How to view the Free space available for my Data Base in MySQL", then run the below query:

SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;

Thanks & Regards,
S. Prakash

"Things are Beautiful, Not Becauase we are Perfect,
Things are Beautiful, Because we put our heart into what we are doing"

Sadhguru Jaggi Vasudev - Founder. Isha Foudation.
www.ishafoundation.org

Options: ReplyQuote


Subject
Written By
Posted
GET THE DATABASE SIZE FROM THE MYSQL QUERY BROWSER
March 20, 2008 12:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.