Check Database size in MySQL

Login to mysql with your usernamse and password.
eg: mysql u root -proot

Then execute the following command:

SELECT table_schema "DB Name", ROUND(SUM(data_length + index_length)/1024/1024, 2) "Size in MBs"
FROM information_schema.tables
GROUP BY table_schema;

Here SUM(data_length + index_length) is in bytes. Hence we have divided it twice by 1024 to convert to Megabytes.

Tags:

Share:

2 comments

  1. This service occupies too much CPU disk space and the memory resource of the computer.
    wsappx windows 10

    ReplyDelete

  2. Game Hacker is an android app which is very popular that is used to hack or manipulate many popular games.
    https://downloadgamehackerapk.com

    ReplyDelete