Tuesday 20 May 2014

Repair MySQL Database When Error 145 occurs

MySQL is a commonly used RDBMS (Relational Database Management Systems) that provides variety of functions. People like to work with this file as it provides great features to both small and big firms. In MySQL databases there are two main storage engine to keep your important data InnoDB and MyISAM. MyISAM table is the default database engine that provides various features to manage your database. It is best for table locking that make useful while performing the real-time transactions on sites. But when the tables get corrupt your data present in it becomes inaccessible. The reasons behind the corruption are many such as virus attack, power failure, sudden system shutdown when your database is open and many more. But no matter what are the reasons behind the corruption you can easily repair and recover the corrupt file in a new healthy form. Don’t panic you can restore the data from updated backup. But what if the updated backup is not available or the backup fails to restore so what you will do at this situation. While working on MySQL database table you got the following error:

“MySQL error code 145= Table was marked as crashed and should be repaired”
After getting the following the error your data become inaccessible. The reason behind the above error message is that your database is corrupted due to the insufficient space in your database. To resolve the above message you can use the following methods. First of all make the copy of the database. After this discontinue the MySQLD server. Now run myisamchk –r –q to repair the index file it don’t affect the file it is just used to execute fast recovery of the database. No matter if the above methods fail you can try the second steps try myisamchk that is safe recover command. It is used to execute the detail scan after this repair the complete database.  But is the above method fails then you can create blank data and index files by using this commands: 
shell> mysql db_name
mysql> SET autocommit=1;
mysql> TRUNCATE TABLE tbl_name;
mysql> quit

After this copy the old data in new file. By doing this the issue is resolved. If the above methods fail then you need to use third party repair tool to solve MySQL error code 145. MySQL File Repair Tool is the professional recovery software that help you to recover corrupt, damaged or inaccessible MySQL database. It can repair any sort of corruption issue in your MySQL database e MyISAM storage engine. It has the ability to repair the corrupt database which is created in MySQL 4 .x or 5 .x versions. It supports almost every Windows server 2000, 2003, 2008, Windows XP, Windows Vista, etc. It is simple, easy to use and doesn’t need the person to have to the technical skill to operate it. 

0 comments:

Post a Comment