I recently noticed that I had lost all my comments from the Enterpriseyness blog (this website, a WordPress site). I decided to look at the database table that stores my comments. By default, the comments are stored in wp_comments but you have the option to use any prefix other than ‘wp’ when you are setting up your WordPress site.
I decided to take a look at the comments table for some clues and was presented with the following error message:
#144 - Table './###/wp_comments' is marked as crashed and last (automatic?) repair failed
I am not a heavy MySQL user so I went off to Google and came across a few ideas. Before anything else, I made sure to back up my current database. Things are bad, I don’t want them getting worst. The first idea I came across was to simply attempt to repair the table manually
repair table wp_comments
This immediately brought my WordPress comments back. You can learn more about repair function on MySQL’s website.