We have developed software that uses MySQL. After some months of usage, some of the database tables had been corrupted and need to be repaired. Because of the corruption,we are not able to create a backup using Navicat, and we can not generate a dump too.

The log file has been indicating the following error for more than 2 days:

YYMMDD HH:MM:SS [ERROR] /usr/sbin/mysqld: Can't open file: 'ini.MYI' (errno:145)

What is the cause of this corruption? How can we fix them? How can we prevent the database tables from corruption in the future?

migrated from programmers.stackexchange.com Aug 19 '14 at 10:38

This question came from our site for professionals, academics, and students working within the systems development life cycle.

  • 2
    A first step is probably getting rid of the dreaded MyISAM engine and convert your tables to InnoDB. – a_horse_with_no_name Aug 19 '14 at 10:53

Have you tried



 myisamchk --recover tbl_name



As mentioned in the comments under your question, convert your tables to InnoDB tables which are transactional. This should help prevent corruptions in the future.

  • I have tried the repair,and I've got an error,but I didn't test the "myisamchk --recover tbl_name" – Hbirjand Aug 19 '14 at 15:56
  • And something that more important here is prevention. – Hbirjand Aug 19 '14 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.