Check MySQL table size without shell

Published on Author admin

logo-mysql-110x57

The simplest way to check the size of table is to check it via *nix ‘df’ command. Enter the location of your db, in my case it is ‘/var/db/mysql/admins247’ (‘/var/db/mysql/’ is default for FreeBSD) and perform:

This will show you the ammount of space the table is occupy on your disk. Usually you do have shell access to the database server to perform it. But even this method won’t work if your keep all your tables in a single file. So is there is a way to check MySQL table size without shell?
Fortunately there is a native method to check table size by means of SQL query.

Let assume that your database name is my_database and the table name is my_table:

After a while you’ll get the result for MySQL table size:

To show all information about all tables%

Note:
There is the difference between the size of your data in the DB and the size the data takes in your hard drive. The amount of space data is taken on hdd is always greater.

that’s it!