<input type="hidden" id="_wpnonce" name="_wpnonce" value="db2e16fcc6" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/26979" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="db2e16fcc6" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/26979" />{"id":26979,"date":"2019-03-19T18:01:43","date_gmt":"2019-03-19T07:01:43","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=26979"},"modified":"2019-03-19T18:01:43","modified_gmt":"2019-03-19T07:01:43","slug":"how-to-fix-deleting-a-table-that-doesnt-exist","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2019\/03\/19\/how-to-fix-deleting-a-table-that-doesnt-exist\/","title":{"rendered":"HOW TO FIX DELETING A TABLE THAT DOESN&#8217;T EXIST"},"content":{"rendered":"<!--CusAds0--><p>In my mySQL database I noticed that there was a table missing from phpmyadmin. I tried creating the table but mySQL\u00a0reported that it already exist (it was a ghost table). I tried using mysqlcheck\u00a0to repair the database and it came back saying it the table didn&#8217;t exist. I then tried to create the table and mySQL returned an error message saying it already exists. That&#8217;s where I was totally CONFUSED!<\/p>\n<p>After some digging around and researching, I checked the \/var\/lib\/mysql\/[database]\u00a0 folder to see if the table name files existed and they were there. I deleted those files and copied them from another database but still had the same issue. After copying the files you need to change the file permissions of the copied files to the\u00a0mysql\u00a0service.<\/p><!--CusAds0-->\n<pre class=\"lang:default decode:true \">chown -Rv mysql:mysql [database files]<\/pre>\n<p>&nbsp;<\/p>\n<p>After a lot of digging around, I managed to work out the solution. I need to instal mysql-utilities and run this command:<\/p>\n<pre class=\"lang:default decode:true \">yum install mysql-utilities\r\n\r\nmysqlfrm --diagnostic [table_name].frm<\/pre>\n<p>After that, the table was fixed. You can then delete it.<\/p>\n<p>&nbsp;<\/p>\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>In my mySQL database I noticed that there was a table missing from phpmyadmin. I tried creating the table but mySQL\u00a0reported that it already exist (it was a ghost table). I tried using mysqlcheck\u00a0to repair the database and it came back saying it the table didn&#8217;t exist. I then tried to create the table and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":27027,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3897,497,1624,1713,747,1778],"class_list":["post-26979","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business","tag-corrupt","tag-database","tag-fix","tag-how-to","tag-mysql","tag-table"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/26979","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=26979"}],"version-history":[{"count":2,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/26979\/revisions"}],"predecessor-version":[{"id":27028,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/26979\/revisions\/27028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/27027"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=26979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=26979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=26979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}