MySQL offline and online tables repairing

I had a DB crash today. MySQL's tables crashed and I needed to repair them.

MySQL provides three ways of repairing its MyISAM tables:

1. "Repair Table" SQL query. (e.g. "Repair Table TableName;" from MySQL Shell)
2. Using the mysqlcheck utility. (e.g. "mysqlcheck -uuser -p DBName TableName" from command line shell)
3. Using myisamchk utlity (e.g. "cd /path/to/mysql/files/DBName; myisamchk TableName" from command line shell)

The first two methods are online methods, that is you can perform them while MySQL server is running and apart from your corrupt tables other services keep running smoothly. However these processes can be painfully slow since the server must serve data and keep its integrity while performing the repairs.

However mysqlchk is an offline method; it requires that the server must be down. It opens the server files itself and examines them on its own. This method is quite faster. For me, the online method took more than an hour while the offline method completed its job in less than two minutes. It was worth shutting down the MySQL server.

Dell Studio 15 1558 Random Shutdown and Bad Firmware Problem

Earlier this year I bought Dell Studio 15 1558 Notebook. My first experience with Dell turned out to be very disappointing. From the day one I my notebook would shutdown randomly at odd intervals. It was so annoying and I had no clue to why it was happening. Several months later I got to know that Studio 15 series has BIOS issues and Dell has released several updates. I struggled with a BIOS update which was hard to get running but when it did, it crashed in the middle and turning my expensive notebook into a brick: the power light would turn on but nothing would show up as the BIOS was corrupted. Worst, the tech-support which Dell takes a lot of pride in, refused to help me saying that they don't deliver in the country I am currently in.

This was certainly not the level of satisfaction with Dell my friend have had. However I was able to get my machine back alive by utilization a special methods which I got to know from the Dell community; thanks to them!

Most of the Dell machines have Phoenix BIOS. In Phoenix a small part of BIOS ;is reserved for crisis recovery and it never gets overwritten. It acts as the BIOS of BIOS. So it is possible to have that special BIOS read from USB which contains the BIOS image and re-program it. This actually worked for me!

Here is the link that helped me: http://en.community.dell.com/support-forums/laptop/f/3518/p/19334957/19706315.aspx

I followed the following steps:

On a separate working machine:

1. Download the flash recovery tools from here: http://www.mediafire.com/?m2jdiby1xjm. Extract them in a separate accessible folder on your drive.
2. Download the latest BIOS (In my case A08). Run it, and extract it in a folder.
3. From the extracted folder, run 1558_A06.exe. It'll create WinPhlash folder in your Temp directory. (To find the location of your temp directory, go to command prompt and issue command "set temp" to find out)
4. From WinPhlash directory rename BIOS1.WPH to BIOS.WPH and move it to the flash recovery tools folder, overwriting the existing BIOS.WPH.
5. Plugin a USB Memory Stick and run WinCris.exe as Administrator. (Not running as administrator will give you error "Warning, no removable storage plugged in"). This will create three files on the memory stick.

Now on the bricked machine:

1. Remove the battery of the notebook and unplug its power.
2. Hold the power button for a few seconds, it'll remove any static.
3. Plug in the USB Memory Stick, plugin power and turn the machine on. The Led on memory stick will blink for 30 to 40 seconds after which it'll stop blinking. Now wait for a few minutes. Your computer will get restarted upon which remove USB. System will now be alive again with updated BIOS! :-)