You may have noticed at times that your databases are shown as 0MB in size when logging in to cPanel. There’s a rather simple fix to this issue, unless your databases are actually empty.
- SSH into your server. Open the cPanel configuration file using this command:
From this point onwards, disk size calculations will include database sizes and the correct numbers will be reflected in cPanel.
The reason the above directive is disabled by default is to decrease server load due to the potential for such calculations to consume CPU power if you have numerous databases with a lot of tables.
In the event that you still see zero sizes of MySQL databases, run this script:
Doing this will rebuild the cache comprising numbers with database size.