Problem:An error existed on my website and the log file throws the following status:
#1194 - Table [TABLE_NAME] is marked as crashed and should be repaired
AnalysisThis seems to happen right after I was executing an action on my development website and the system shuts down and crashed. It seems that this is one of the common reasons why the issue happens (c/o of Stackoverflow). Aside from this, there might be some other factors that might be the reason why it happens:
- harddisk failure
- sudden server reboot
- server crash
- firmware problems (raid controller or bios)
- defects in the cabling
SolutionThere are many ways to solve this, here are the common solutions:
- Using PHPMyadmin
If you are using PHPMyadmin, this might be the easy way out of this problem.
- First is log-in to your PHPMyadmin panel
- Pick your database and go select/check the table that is causing the trouble.
- Scroll down on the bottom part of the page to see a drop-down box and select Repair table
- Via Console or Command Line(CLI)
If you have access on the console or SSH, you may want to do it via the said option.
- Log in to your SSH access
- Log in to your
mysqlclient access, (e.g.
mysql -u [USERNAME] -p)
- Select the database (e.g.
- Then type the following command:
REPAIR TABLE [TABLE_NAME]