Question
Why does the cPanel interface show a different size for databases than phpMyAdmin?
Answer
When reviewing database sizes, cPanel can calculate the size in two ways depending on the WHM Tweak settings.
Use INFORMATION_SCHEMA to acquire MySQL disk usage | This setting uses MySQL’s INFORMATION_SCHEMA view to include MySQL table disk usage when it calculates disk usage totals. This setting causes MySQL to become unresponsive until data collection finishes, which may degrade your system’s performance. |
|
If this setting is disabled, cPanel will calculate the used size, similar to a "du" report on the database directory. When the setting is enabled, cPanel uses the disk space reported by MySQL information schema.
The phpMyAdmin will read the size directly from the MySQL information schema automatically. If the tweak setting is off, it will cause the disk usage for databases to be different. MySQL doesn't calculate the disk usage the same way as a "du" report. You can find more details on the information schema in MySQL's documentation.
cPanel also returns a cache of the database sizes; this cache only updates every 4 hours via cron job script:
/scripts/update_db_cache
Comments
0 comments
Article is closed for comments.