HOW TO FIX A CORRUPTED TABLE IN A MYSQL DATABASE

January 13, 2017   /   by Marco  / Categories :  Software, Technology, TIP AND TRICKS, Websites, wordpress
HOW TO FIX A CORRUPTED TABLE IN A MYSQL DATABASE

One of the websites I manage Digital Signage Blog was not displaying correctly (posts were not displaying, menu was missing links to the categories and only displaying pages) and after some investigation, I discovered one of the database tables (the categories table – wp_term_taxonomy) was corrupted. I attempted to repair the database by using these instructions How to check and repair MySQL tables using MySQLcheck and How to repair WordPress databases but both instructions didn’t work.

When I ran the repairs using the above methods there were no errors being reported that the database was corrupted. The only way I figured out that one of the tables was actually corrupted was to login to phpMyAdmin and saw the status of the table being in use.

When I tried repairing that particular table using phpMyAdmin and it reported ‘Can’t create new tempfile:..’ and the ‘Operation failed’

So to fix this I had to login to my VPS and use the SSH terminal to issue the following commands. Firstly go to the database files

cd /var/lib/mysql/[name_of_your_database]

Then use this command to fix it:

myisamchk -r -f wp-term_taxonomy.MYI

This was the result, it fixed 3 indexes.

myisamchk repair

Here’s a video of how to do this:

DO YOU LIKE WHAT YOU'VE READ?
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!

Our Sponsors

  • Follow us:

OTHER ARTICLES YOU MAY LIKE


USE THESE TOOLS TO BUILD YOUR BUSINESS

USE THESE TOOLS TO BUILD YOUR BUSINESS

Building a business has never been short on ambition, but it has often been short on time, budget, and operational headroom. Founders are expected to market like a media team, sell like a seasoned closer, support customers around the clock, manage projects with precision, and still find space to think strategically. That is exactly why […]

read more
HOW TO USE SPLIT VIEW IN GOOGLE CHROME

HOW TO USE SPLIT VIEW IN GOOGLE CHROME

Google Chrome is full of useful features that many people never notice until they appear by accident during everyday browsing. One of those quietly helpful tools is Split View, a feature that makes it much easier to work with two tabs side by side in the same browser window. If you regularly compare documents, read […]

read more

Like our Page