June 22, 2008
How To Fix MySQL Tables That Have Crashed
The other day at work there one of the tables crashed on us in our development site and we were unable to access any of the data. I was going to just replace the data from our live site, but my co-worker Joe suggested that we figure out a solution in case it happens on live.
After looking up the documentation we realized that if you shut down the mysql server and go into the directory that the data is located, you can type in the following command, it will fix the table without touching the data.
“myisamchk -r -q name_of_table.MYI”
Hope this helps.
