{"id":282,"date":"2025-04-15T13:29:35","date_gmt":"2025-04-15T11:29:35","guid":{"rendered":"https:\/\/www.24x7serverguard.com\/blog\/?p=282"},"modified":"2025-04-15T13:29:35","modified_gmt":"2025-04-15T11:29:35","slug":"%f0%9f%9b%a0%ef%b8%8f-fix-database-size-not-updating-in-cpanel-shows-as-zero","status":"publish","type":"post","link":"https:\/\/www.24x7serverguard.com\/blog\/cpanel\/%f0%9f%9b%a0%ef%b8%8f-fix-database-size-not-updating-in-cpanel-shows-as-zero\/","title":{"rendered":"\ud83d\udee0\ufe0f Fix: Database Size Not Updating in cPanel (Shows as Zero)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Are you seeing <strong>\u201c0 MB\u201d database size<\/strong> in cPanel under <strong>MySQL Databases<\/strong>, even though your databases are clearly in use?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This issue is usually due to cPanel not including database sizes in its disk usage calculation. Luckily, there&#8217;s a quick fix.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2753 Problem<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In cPanel \u2192 <strong>MySQL Databases<\/strong>, the <strong>database size shows as zero<\/strong>, even when it&#8217;s not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This happens when the configuration doesn\u2019t allow SQL databases to be counted in disk usage stats.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Solution: Enable SQL Disk Usage in cPanel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps below to fix this issue:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd27 Step 1: Edit the cPanel Config File<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SSH into your server as <strong>root<\/strong>, and open the cPanel config file:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">vi \/var\/cpanel\/cpanel.config<\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Look for this line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">disk_usage_include_sqldbs<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">=<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">0<br><\/mark><br>Change it to:<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">disk_usage_include_sqldbs<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">=<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">1<\/mark><br><br>\ud83d\udd01 Step 2: Update the Database Size Cache<br>Run the following command to refresh the database size cache:<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">\/scripts\/update_db_cache<\/mark><br><br>This will force cPanel to recalculate and display the correct database sizes.<br><br><br>\u2705 Done!<br>Now, when you check MySQL Databases in cPanel, the correct sizes should appear.<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\"><br><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><br><\/mark><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Are you seeing \u201c0 MB\u201d 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&#8217;s a quick fix. \u2753 Problem In cPanel \u2192 MySQL Databases, the database size shows as zero, even [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[271,268,269,267,200,270],"class_list":["post-282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","tag-config-file","tag-database","tag-database-size-not-updating-in-cpanel","tag-db","tag-mysql","tag-sql-disk-usage"],"_links":{"self":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":284,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions\/284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media\/283"}],"wp:attachment":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}