<input type="hidden" id="_wpnonce" name="_wpnonce" value="4449f5584e" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2725" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="4449f5584e" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2725" />{"id":2725,"date":"2014-09-26T23:35:25","date_gmt":"2014-09-26T13:35:25","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=2725"},"modified":"2017-01-13T13:35:37","modified_gmt":"2017-01-13T02:35:37","slug":"check-repair-mysql-tables-using-mysqlcheck","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2014\/09\/26\/check-repair-mysql-tables-using-mysqlcheck\/","title":{"rendered":"How to Check and Repair MySQL Tables Using MySQLcheck"},"content":{"rendered":"<!--CusAds0--><p>For some reason my WordPress site was not displaying the correct information. The site uses WooCommerce and the products was not displaying at all. This was quite strange.<\/p>\n<p>I thought I&#8217;d better backup the database so when I did, I received the following error message:<\/p>\n<p>mysqldump: Got error: 145: Table &#8216;.\/xxx\/wp_postmeta&#8217; is marked as crashed and should be repaired<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone wp-image-2729\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all\" alt=\"How to Check and Repair MySQL Tables Using MySQLcheck\" width=\"598\" height=\"297\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all 837w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck-300x149.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all&amp;w=167 167w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all&amp;w=502 502w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all&amp;w=669 669w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/09\/How-to-Check-and-Repair-MySQL-Tables-Using-MySQLcheck.png?strip=all&amp;w=450 450w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/a><\/p><!--CusAds0-->\n<p>This got me a little worried. So after some researching I had to check and repair MySQL\u00a0database and tables.<\/p>\n<p>The commands I had to use were:<\/p>\n<p><strong>To check the database<\/strong><\/p>\n<pre class=\"lang:default decode:true \"># mysqlcheck -c [database_name] -u root -p<\/pre>\n<p><strong>To repair the database<\/strong><\/p>\n<pre class=\"lang:default decode:true \"># mysqlcheck -r [database_name]\u00a0-u root -p<\/pre>\n<p>After running the repair, the problem was fixed.<\/p>\n<div class=\"lt-box\" style=\"border:1px solid #a82264\"><div class=\"lt-box-title\" style=\"background-color:#d22b7d;border-top:1px solid #edaacb;text-shadow:1px 1px 0 #3f0d25\">RESOURCES<\/div><div class=\"lt-box-content\">To display the databases use the command show databases;\u00a0<\/div><\/div>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>For some reason my WordPress site was not displaying the correct information. The site uses WooCommerce and the products was not displaying at all. This was quite strange. I thought I&#8217;d better backup the database so when I did, I received the following error message: mysqldump: Got error: 145: Table &#8216;.\/xxx\/wp_postmeta&#8217; is marked as crashed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2729,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,382],"tags":[738,1564,767,205],"class_list":["post-2725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-wordpress","tag-check","tag-databases","tag-show","tag-use"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=2725"}],"version-history":[{"count":9,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2725\/revisions"}],"predecessor-version":[{"id":6947,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2725\/revisions\/6947"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/2729"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=2725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=2725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=2725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}