Home » Database, MySQL4 April 2016

MySQL: Get size of all databases and tables

This article shows SQL query to get size (in MB) of all MySQL databases. It also shows the query to get the size (in MB) of all the tables present in any particular database.

Get size (in MB) of all MySQL databases

The result will be displayed something like below:

Database NameDatabase Size in MB
database-10.38486862
database-226.86670208
my-db0.06250000
test0.09375000

Get size (in MB) of all tables of a particular database

Here, we need to replace “database_name” with the name of the database whose table’s size we are going to find.

Suppose, we have a database named “test” and we want to find the size of all the tables in that database, then the query to do so will be:

The result will be displayed something like below:

TableSize (MB)
tags0.02
publishing0.02
orders0.02

Hope this helps.
Thanks.

MySQL

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed