Getting MySQL Database Size

Just run the following query to get MySQL database size and free space

SELECT table_schema “Database Name”,
sum( data_length + index_length ) / 1024 /
1024 “Database Size (MB)”,
sum( data_free )/ 1024 / 1024 “Free Space (MB)”
FROM information_schema.TABLES
GROUP BY table_schema ;

 

Reference:
http://forums.mysql.com/read.php?108,201578,201578

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s