How do I fix and prevent corrupted MySQL tables? 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?
Have you tried 

REPAIR TABLE;


or 

 myisamchk --recover tbl_name


http://dev.mysql.com/doc/refman/5.1/en/repair-table.html

--EDIT--

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.