Query to select size of each of DB in MY SQL server
SELECT table_schema as “Name Of Database”,
sum( data_length + index_length )/1024/1024 as “Size of Data Base in MB”
FROM information_schema.TABLES GROUP BY table_schema ;
This will return size of EACH database on the SQL server. If there are 5 Databases, it will return 5 rows having two columns, first column as name of the DB and second column as its size.
Posted on June 1, 2012, in MY SQL and tagged DB query MySQL, Size of DB. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0