Thursday, December 29, 2011

5 Mistakes To Be Careful Of When Recover data from corrupt MySQL Server Database

Image representing MySQL as depicted in CrunchBase
Image via CrunchBase
When I first started to work on MySQL Server, I read almost everything I could lay my hands on about MySQL Server. One day my database gets corrupt & I am sure that I can recover it because I know each & everything about it. But I was wrong!! 


Unfortunately, not all my steps were right as I had thought MySQL database get recovered. All my data get lost because of some minor mistakes. Looking back, I checked all the steps that I had committed countless mistakes in my quest to repair MySQL database. And through the days, I had learned from my mistakes and had recovered my friends MySQL data, though it did take some time.
 

Here I have put together a list of 5 common mistakes to be careful of, that I would be sharing with you, so you don’t need to learn!!

 
Mistake #1: Perform Recovery On The Copy Of The Database:

This is my one of the biggest mistake: I performed recovery process on the original corrupt file. Always remember when you try inbuilt or third party tools to recover MySQL database, do not run it on the original file. It decreases the chances of recovery. It is not sure that each & every steps taken by you will be right as happen in my case. My data get overwrite & recovery steps also were wrong. I lost my data permanently. Always perform recovery process on the copy of the corrupt file. If anything gets wrong during recovery, at least you have your original file.

 
Mistake #2: Save Recovered data in the same drive where the original data was saved:

After recovery I saved recovered data in the same file. DONOT save recovered data on the same file it is also overwrite your old data. If recovery process is not right then you lost your original file as well chances of recovery. Because overwrite data can never be recovered.

 
Mistake #3: Store backups in the same drive where the original data was save:

Choosing the right location to backup your database!  Store backups as far away from the original data as possible! You will be surprised that I kept backups on the same RAID as the original data. My Backup copy also gets corrupted with my original database file. So DON'T DO THIS MISTAKE!!

Note: Backup should be performing while the MySQL database server is not running. If MySQL server is running, first you need to perform appropriate
 locking, so that server will not change database contents during the backup process.

 
Mistake #4: USE Appropriate Command Line Tool: 

The most important part of the MySQL Recovery process and yet the most common MySQL Recovery mistake ever that the mysqld server was not stop during recovery process. If you are going to repair a table or full database from the command line tool, you must first stop the mysqld server. When you will do mysqladmin shutdown on a remote server, the mysqld server is still available for a while after mysqladmin returns, until all statement processing has stopped and all index changes have been flushed to disk. So do ensure that you do research first about the MySQL Recovery process then used any command.

 
Mistake #5: PURCHASE MySQL RECOVERY SOFTWARE AFTER FULL VERIFICATION:
 
I’m sure you have come across many sites which seemed to be saturated with the data recovery theme. Some users believe that by choosing any MySQL recovery software, he could be able to detect the corruption & easily recover data. But it is not necessary that every data recovery software can recover your data. You should choose software after full verification like check all the features of the software, check demo version of the software etc.

 
These are some common mistakes which generally users commit whenever they work on MySQL database that needs to be learn and important to recover MySQL database by leaps and bounds.
Enhanced by Zemanta

No comments:

Post a Comment