{"id":175,"date":"2009-10-04T17:56:03","date_gmt":"2009-10-04T21:56:03","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=175"},"modified":"2013-03-20T08:40:09","modified_gmt":"2013-03-20T12:40:09","slug":"howto-repair-a-mysql-table","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-repair-a-mysql-table","title":{"rendered":"Howto: repair a mysql table"},"content":{"rendered":"<p>If you receive the following error message on your website, which means the table is crashed.<\/p>\n<blockquote><p><span style=\"color: #993300;\"><strong>&#8220;Table &#8220;tablename&#8221; is marked as crashed and should be repaired&#8221;<\/strong><\/span><\/p><\/blockquote>\n<p>The <strong>Mysql table consists of 3 files, .MYI, .MYD and .frm<\/strong>. The .<strong>MYI file contains the structure<\/strong> and results in the error message if something goes wrong with it. <strong>There are 3 ways to repair the table:<\/strong><\/p>\n<blockquote><p><span style=\"color: #993300;\"><strong>1)\u00a0 Login to your cPanel, goto &#8220;Mysql Databases&#8221; option and click &#8220;Repair DB&#8221; in front of the databases.<\/strong><\/span><\/p>\n<p><span style=\"color: #993300;\"><strong>2) Login to your server, goto mysql directory \/var\/lib\/mysql and execute the command: \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 myisamchk -r dbname\/tablename.MYI<\/strong><\/span><\/p>\n<p><span style=\"color: #993300;\"><strong>3) Login to your server, goto Mysql prompt and execute the Mysql query:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 repair table tablename;<\/strong><\/span><\/p><\/blockquote>\n<p>Anyone of the above 3 steps will repair the table and site will be back online.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you receive the following error message on your website, which means the table is crashed.<br \/>\n&#8220;Table &#8220;tablename&#8221; is marked as crashed and should be repaired&#8221;<br \/>\nThe Mysql table consists of 3 files, .MYI, .MYD and .frm. The .MYI file contains the structure and results in the error message if something goes wrong with it. There are 3 ways to repair the table:<br \/>\n1)\u00a0 Login to your cPanel, goto &#8220;Mysql Databases&#8221; option and click &#8220;Repair DB&#8221; in front of the databases.<br \/>\n2) Login to your server, goto mysql directory \/var\/lib\/mysql and execute [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[111],"tags":[196,194,197,195,198,193,199],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/175"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":9,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/175\/revisions\/177"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}