Are you seeing β€œ0 MB” database size in cPanel under MySQL Databases, even though your databases are clearly in use?

This issue is usually due to cPanel not including database sizes in its disk usage calculation. Luckily, there’s a quick fix.


❓ Problem

In cPanel β†’ MySQL Databases, the database size shows as zero, even when it’s not.

This happens when the configuration doesn’t allow SQL databases to be counted in disk usage stats.

βœ… Solution: Enable SQL Disk Usage in cPanel

Follow the steps below to fix this issue:


πŸ”§ Step 1: Edit the cPanel Config File

SSH into your server as root, and open the cPanel config file:

vi /var/cpanel/cpanel.config

Look for this line:

disk_usage_include_sqldbs=0

Change it to:
disk_usage_include_sqldbs=1

πŸ” Step 2: Update the Database Size Cache
Run the following command to refresh the database size cache:
/scripts/update_db_cache

This will force cPanel to recalculate and display the correct database sizes.


βœ… Done!
Now, when you check MySQL Databases in cPanel, the correct sizes should appear.


By admin