April 27, 2010

Mysql table corrupt

Filed under: Uncategorized — george @ 9:25 am

One of the servers i am running at work (a debian box running on a sparc sun machine) decided to stop responding, after months of running smoothly.  My first reaction was “F**K there goes my uptime!!).  I could not connect to the box in any way so we had to do a hard reboot.  When the machine started again, one of the mysql tables of RT (ticketing system running on it), was corrupted (the table was marked as crashed).

After googling i endedup with a mysql command to repair the table, which failed due to a “Not enough memory for blob”.  I ended up with the following link : http://maheshsworld.jokesplanet.com/?q=mysql_crash which basically allows you to increase the allowed blob size when using the myisamchk command.  For example myisamchk –max-record-length=1048576 -r -f <table_name> . This command needs to be ran in the same folder as the .MYI file of the table we are trying to fix.  In my case this was under /var/lib/mysql/<DB NAME>/ .

I hope this is useful.


29 queries. 0.194 seconds. Powered by WordPress.