This is an old revision of the document!
By default, we disable an option in WHM to include MySQL database sizes in disk usage calculations. The primary reason for this is due to the inefficiency and high resource usage of the script used to generate this usage calculation which consumes a lot of CPU, especially if you have many databases, or large databases.
We strongly recommend keeping this usage calculation turned off to save on resources. You're probably asking yourself something like "Why is this any less efficient than calculating the disk usage of my file structure?". The answer to that question is rather simple: Due to the fact that /var/lib/mysql and it's subdirectories (each database has a folder here) must be owned by the system's MySQL user and group (mysql:mysql), the system filesystem quotas cannot be used to calculate this usage like they are used to calculate it for your users home directory filesystem.
There are a couple of ways this can be accomplished:
/var/cpanel/cpanel.configfile. For this tutorial I'll be using
/scripts/update_db_cacheif you'd like to force a database size calculation immediately - otherwise it will be calculated with the system quotas at their next run.
/usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettingsto enact the new setting change we made.