Category Archives: MySQL

MySQL Error: Can’t perform query: Can’t open file: ‘xxxx.MYI’ (errno: 145)

I have timesheet.php and bugzilla 2.20 running on a linux box sharing same mysql db server.

When I tried logging-in to both the applications, I got following error.

Can't perform query: Can't open file: 'xxxxxx.MYI' (errno: 145)

You will face this error when your MySQL table is corrupted, and there are a few reasons for that:
1 – Server crash;
2 – Hardware failure;
3 – A MySQL write process was interrupted;

However you can fix this very easy with a simple query…

$ mysql
mysql> use database_name;
mysql> REPAIR TABLE table_name;

This will repair the specified table. The name of the table which is corrupted can be seen in the error as ‘xxxxx.MYI’.

Good luck.