{"id":20843,"date":"2026-11-22T13:55:23","date_gmt":"2026-11-22T10:55:23","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/repair-mysql-database-cpanel\/"},"modified":"2026-11-22T13:55:34","modified_gmt":"2026-11-22T10:55:34","password":"","slug":"repair-mysql-database-cpanel","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/repair-mysql-database-cpanel\/","title":{"rendered":"Check and Repair a MySQL Database in cPanel When Tables Are Corrupted"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>When you need it<\/b>If you see a message such as <b>Table is marked as crashed<\/b>, or certain pages suddenly fail, open <b>Manage My Databases<\/b> in cPanel. Under <b>Modify Databases<\/b> pick the database and click <b>Check Database<\/b>; if it reports an error, click <b>Repair Database<\/b>.<\/div>\n<div class=\"hy-vid\"><div style=\"width: 1280px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-20843-1\" width=\"1280\" height=\"720\" poster=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-repair-en.jpg\" preload=\"none\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-repair-en.mp4?_=1\" \/><a href=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-repair-en.mp4\">https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-repair-en.mp4<\/a><\/video><\/div><\/div>\n<p>Tables can be damaged if the server stops while writing, the disk fills up, or a large operation is cut off half way. Damage usually affects one table, so one page or feature fails while the rest of the site works.<\/p>\n<h2>Signs of a damaged table<\/h2>\n<ul class=\"hkb-list\">\n<li>The message <code>Table '...' is marked as crashed and should be repaired<\/code>.<\/li>\n<li>The message <code>Incorrect key file for table<\/code>.<\/li>\n<li>One page or section shows a database error while other pages work.<\/li>\n<li>The WordPress dashboard asks you to repair the database.<\/li>\n<\/ul>\n<div class=\"hkb-note warn\"><b>Before repairing:<\/b> export a copy of the database from phpMyAdmin. Repairs are usually safe, but a copy protects you if something is lost. See <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/import-export-mysql-database-phpmyadmin\/\">exporting a database<\/a>.<\/div>\n<h2>Check, then repair<\/h2>\n<ol class=\"hkb-steps\">\n<li><b>Open Manage My Databases<\/b> in the Databases section of cPanel.<\/li>\n<li><b>Scroll to Modify Databases<\/b> there are two lists: check and repair.<\/li>\n<li><b>Pick the database and click Check Database<\/b> the result for each table appears.<\/li>\n<li><b>If a table shows an error<\/b> go back, pick the same database in the repair list and click Repair Database.<\/li>\n<li><b>Open your site<\/b> and make sure the broken page works again.<\/li>\n<\/ol>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hkb-fd-en-db-repair.webp\" alt=\"The Modify Databases section with Check and Repair buttons in cPanel\" width=\"800\" height=\"451\" loading=\"lazy\" \/><\/figure>\n<h2>The repair did not work?<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Situation<\/th>\n<th>What to do<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The message says the table type does not support repair<\/td>\n<td>InnoDB tables usually recover on their own. Send the error to support<\/td>\n<\/tr>\n<tr>\n<td>The disk is full<\/td>\n<td>Free space first, see <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-disk-usage\/\">Disk Usage<\/a>, then try again<\/td>\n<\/tr>\n<tr>\n<td>The problem keeps coming back<\/td>\n<td>A plugin or script may be writing heavily. Contact support with the table name<\/td>\n<\/tr>\n<tr>\n<td>Data missing after the repair<\/td>\n<td>Import the copy you took, or ask for a restore from backups<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Is it really the tables?<\/h2>\n<p>The WordPress message <b>Error Establishing a Database Connection<\/b> is usually not corruption but a wrong database name, user or password. See <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/fix-error-establishing-a-database-connection-in-wordpress\/\">fixing the database connection error<\/a> before repairing.<\/p>\n<h2>Frequently asked questions<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>Does repairing delete data?<\/summary>\n<p>Rarely, but always take a copy first.<\/p>\n<\/details>\n<details>\n<summary>How long does a repair take?<\/summary>\n<p>Seconds for a small database, longer for large tables.<\/p>\n<\/details>\n<details>\n<summary>Should I take the site offline while repairing?<\/summary>\n<p>Not for a small database. For a big store pick a quiet time.<\/p>\n<\/details>\n<details>\n<summary>Every table says OK. So where is the problem?<\/summary>\n<p>The database is fine; the cause is usually the connection settings or the site itself.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/import-export-mysql-database-phpmyadmin\/\">Export and Import a Database with phpMyAdmin in cPanel: Backups and Site Moves<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/create-mysql-database-cpanel\/\">Create a MySQL Database and User in cPanel: With the Wizard or by Hand<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/fix-error-establishing-a-database-connection-in-wordpress\/\">Fix Error Establishing a database connection in WordPress<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-disk-usage\/\">Disk Usage in cPanel: See What Fills Your Hosting Space and How to Free It<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-files-databases-section\/\">The Files and Databases Sections in cPanel: File Manager, FTP and Creating a Database<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/\">All cPanel guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When you need itIf you see a message such as Table is marked as crashed, or certain pages suddenly fail, open Manage My Databases in cPanel. Under Modify Databases pick the database and click Check Database; if it reports an error, click Repair Database. Tables can be damaged if the server stops while writing, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":20809,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2749],"doc_tag":[],"class_list":["post-20843","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-website-control-panel-cpanel"],"year_month":"2026-11","word_count":487,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.hyyat.com\/en\/author\/admin\/"},"doc_category_info":[{"term_name":"cPanel Guides","term_url":"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/20843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=20843"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/20843\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/20809"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=20843"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=20843"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=20843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}