How to Fix “Cannot Find File: .myi” Error in MySQL

By | February 2, 2017

Fix "Cannot Find File: .myi" Error in MySQL

MySQL database is used by many users as it provides many benefits. This database uses MyISAM as default search engine and this is based on older ISAM code but at the same time it consists of many useful extensions. MyISAM generally contains three file extensions which includes .frm, .MYI and .MYD which are used for storing data in proper way. However MYI extension in MyISAM storage engine is for MyIndex and it also denotes to index file where the table’s indexes are stored.

But after certain instances, there occur some incident where MySQL database shows error and .MYI file does not open. At that time the database shows an error message:

Can’t find file: .MYI

This error occurs when .MYI file gets corrupted and this corruption also leads to the entire database corruption. Some of the reasons are mentioned below for the causes:

  • Sometimes due to unexpected system shutdown at the time of using MySQL
  • Internal code errors in MyISAM
  • Due to physical issue
  • Because of network errors
  • Inappropriate locking of tables

Also Read: How to Fix “Key in wrong position…” Error Message in MySQL

Ways to repair the error

Well when the database gets corrupted then its common thing to fix the database but how? Well you can fix the error or corruption of the database which occurs due to .MYI file by following the below mentioned ways:

First using backup– If your database gets damaged or corrupted then you can use the backup of database to get back the file. But when you don’t have any backup of then you can go for the next step.

By using MySQL Repair Commands– When any problem occurs in database then MySQL has database repair commands which can help you to solve the problem that occurs due to database corruption. However to use MySQL repair commands, first you have to check the extent of database table corruption by following one of the mentioned commands:

  • CHECK TABLE table_name
  • myisamchk *.MYI
  • mysqlcheck *.MYI

When any damage is identified then follow the commands to repair the entire database table where the corruption is found

  • REPAIR TABLE table_name
  • myisamchk *.MYI
  • mysqlcheck *.MYI

Well the above mentioned methods are the ways to repair the error but still if you face the same problem then it’s better to go for some professional software to fix the damaged database.

Related: MySQL table is marked as crashed and should be repaired

Solution to repair the error

When you don’t have any backup available with you and there is no other possible ways to repair the error of MySQL then it is better to use third party tool like MySQL Repair Tool. This is one of the best repair software which completely repairs the entire database when corrupted. It performs successful SQL server recovery and fix the damaged database without any problem. This is especially designed to perform fast and effective database recovery. It has user-friendly interface and it repairs objects such as triggers, tables, views completely without any fail. It works with all version like Windows 7, XP, Vista, Windows 2000 and 2003. This software is very much effective which is designed to scan and repair the damaged MySQL database. It offers advanced repair features, interactive interface, to point documentation and also support several options. It has powerful scanning algorithms which effectively repairs the damaged database objects.

downloadnow file buynow learn-more-button-orange

Steps to fix MySQL Database Error

Step 1: Download, install and launch the MySQL Database repair tool.
1
Step 2: Click ‘Select’ button to find and add corrupt MySQL database to the application and then select OK. Here you have the option of ‘Repair corrupt database which is stored at default location of MySQL’ and ‘Manual option to selct your database from default location’.
2
Step 3: After the scanning process you can now see the preview of the file in the left panel of the software.
3
Step 4: Now you can start the reairing process, just click on Repair button. A dialoguie box will appear. Click Yes.
4
Step 5: After successful completion of the process, a message box is displayed as ‘repair process finished successfully’. Click ‘OK’ to close the message box.
5