Repairing Error 145 in MySQL Database
But sometimes an error might occur while storing or maintaining databases, it's not a big deal and can occur anywhere any time depending upon the situations such as the error 145. This article has been written to tell you – How to repair the error 145 in MySQL Database.
The MyISAM table is the default database engine in the MySQL database management system. This MyISAM table provides lots of functions to manage the indexes and fields of the databases. But, sometimes you might get error such as the following one, because of the MyISAM table corruption in the MySQL database;-
** "MySQL error code 145 = Table was marked as crashed and should be repaired" **
To freeze the error and to make the corrupted data (MyISAM table) available for use again you have to perform MySQL repair. But before starting the repair, you should always follow certain precautions like: backup creation of the existing database for preventing further data loss which might occur during the recovery procedure. One thing more you should do before repairing the MySQL Process is – End the mysqld server process in the windows task Manager inside the processes tab.
If you have done the above procedure, most probably it can be assured that your database is not going to corrupt while the repairing process.
You can run"myisamchk -r -q "command to repair the index file for performing quick recovery.
Sometimes, it the command also fails. In such cases you can use another command which performs detailed Scan and repair - myisamchk --safe-recover .
Most, probably your corrupted data base files will be repaired but if not yet, then it highly recommended using a third-party MySQL repair tool that will definitely repair your entire corrupted MySQL database file.