#1. From MYSQL Database
- Login to your cPanel account and go inside MySQL® Databases.
- On the next page, scroll down to Current Databases section where all your database will be listed.
- Under the Size option, size of all the database is mentioned.
#2. From phpMyAdmin
- From the cPanel feature list page, select phpMyAdmin under Databases section.
- On the next page, list of all your database will appear on the left panel list.
- On the right side, you will find all the tables of the selected database with their size.
- The total size of all the tables on a page is given at the bottom.
#3. From WordPress Dashboard
- Login to WordPress dashboard.
- On the right side, under Site Health Status click over Site Health Screen.
- On the next page, move to Info tab where you will find information related to your WordPress website.
- Scroll down to Directories and Sizes section and click over the drop down button.
- Size of the database is given next to Database Size option.
#4. From SSH command
- Login to SSH with required credentials.
- Now, type the following command to switch to mysql prompt.
mysql -u username -p
- It will ask for the password as Enter Password. Type the password and then mysql> prompt will appear.
- To check the size of all the databases, use the following command.
SELECT table_schema AS "Database", ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
- Now, to check the size of each table in a database, copy and paste the following command.
SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "database_name" ORDER BY (data_length + index_length) DESC;
It will give the output including the name and size of all the tables related to particular database.
To learn the in detailed procedure to check the size of website database, read the blog.