23 June 2019

Want to know your MySQL database size?

Well, you can try the script below:

Select
table_schema As "Database Name",
Round(Sum(data_length + index_length) / 1024 / 1024, 2) As "Database Size in MB"
From information_schema.Tables
Where table_schema = 'xxxxx'
Group By table_schema
Order By table_schema;

No comments: