subject: Corruption Of Backup File Created By Mysqldump Command [print this page] Corruption occurs in MySQL database while you are mounting, reading, modifying, or closing the database. Few reasons responsible for corruption of the database could be improper system shutdown, concurrent execution of same database component, virus infection, and application failure. To prevent any corruption scenario, it is advisable to always maintain a decent backup of your database. To do so in MySQL, you will
need to use a utility named 'mysqldump'. Mysqldump program in MySQL is used to dump one or more MySQL databases and create a complete and adequate backup. The program can also be used to transfer database to another database server (SQL or MySQL). However, like any other files, the backup files created using this utility can also be corrupted. In such situations, the database administrator needs to repair the database by using an effective third-party MySQL Database Repair application.
To elaborate the above case, consider a real-time scenario wherein you create a backup of your database by using 'mysqldump' utility. The backup is saved on the same hard drive where your MySQL database is saved. The system gets corrupted due to a fatal virus attack, which further results in corruption of all the files, including original MySQL database as well as its backup. The records saved in both the files become inaccessible after this incidence.
Resolution
To access the records and surmount MyISAM database corruption, you will need to follow the underneath steps:
1.Develop a script that is competent in checking and repairing all MySQL database table.
2.In case, the script fails to repair the tables and the records are still inaccessible, then you will need to restore the backup using mysqldump utility.
3.However, if the backup file fails to open or gets corrupted, then you are not left with any other option, but to use an effective third-party mysql database repair application.
Such mysql repair applications use effective, yet secure repair mechanisms to repair the database to the maximum possible level. The original database, however, remains unaffected at the time of repair. In addition, the repair utility also allows you to preview the repaired database before saving it at specified location.
Database Recovery For MySQL is a user-friendly MySQL Repair utility that performs repair of corrupted MySQL database. Compatible with both MyISAM and InnoDB, the repair application can be installed on Windows 7, Vista, 2003, XP, and 2000. It is compatible with MySQL 5.x and 4.x.