Want to know the size of your MySQL database?

Jovis Low
Jan 12, 2025

--

You can also read this at my Blogger: https://prgexp.blogspot.com/2019/06/want-to-know-your-mysql-database-size.html

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;

--

--

Jovis Low
Jovis Low

Written by Jovis Low

Innovative Inventor, Mentor, and Visionary Leader in Software Delivery | 20+ Years Driving Solutions in SMEs & Banking Products | Expertise in Compliance, etc..

No responses yet