Size of MySQL Databases Shown as 0Mb in cPanel

Sometimes, when logging into cPanel, you’ll see your databases shown with zero size. Unless these databases are empty indeed – there’s an easy way to fix this behavior:

Ssh into your server and open cPanel configuration file:

vi /var/cpanel/cpanel.config

Find the following variable and change its value from 0 to 1:


Restart cPanel service:

/etc/init.d/cpanel restart

From now and on database sizes will be included in disk size calculations and correct numbers will be shown in cPanel.

The above directive is disabled by default in order to decrease server load, as such calculations may consume CPU power in case you have many databases with lots of tables.

[alert]In case you still see zero sizes of MySQL databases – run the following script:


It will rebuild the internal cache containing numbers with database size.[/alert]

Was this article helpful?
Spread the word!