Trending Articles

Blog Post

Technology

How to Fix MySQL Error “Incorrect Information in .frm File”?

How to Fix MySQL Error “Incorrect Information in .frm File”?

MySQL error is one of the most popular database management systems (DBMS). However, even the best DBMS can have data corruption issues. Corruption can occur due to various causes, such as:

  • Sudden system shutdown due to a power failure
  • The system is infected with virus or malware
  • Hardware malfunction, such as disk failure or network failure
  • Software malfunction in the MySQL engine

Data corruption can lead to various error messages. One such error is:

“Incorrect Information in .frm File.”

The error number of this MySQL error is 1033. This error indicates that the internal file .frm is corrupted and does not contain valid data. This is a critical error as this file contains the definition of the tables created by the users. Also, due to this error, the tables become accessible.

Ways to Fix “Incorrect Information in .frm File” Error in MySQL

As the error occurs due to corruption, you can try to fix the corrupted database manually using the commands available in MySQL or by using a third-party MySQL repair software.

1. Using MySQL Commands

Before proceeding with the MySQL repair process, you must know which storage engine the corrupt table is using. MyISAM and InnoDB are the storage engines supported by MySQL. If the corrupted table is using the MyISAM engine, use the following ways:

1) Use Repair Table Statement

You can try to fix this error using the “Repair Table” statement. The syntax of the Repair Table statement is:

Repair table <tablename> use_frm;

Here <tablename> is the name of the corrupted table.

2) Drop and Recreate the Table

Another way to fix this error is to drop and recreate the corrupted table.

In this case, you must:

  • Stop the MySQL server instance and perform a backup of the corrupted table.
  • Place the original FRM, MYD, and MYI files at a safe place.
  • Drop the corrupted table and restart MySQL server instance.
  • Execute the create table statement to recreate the table.
  • Stop the MySQL instance again and copy only the MYD and MYI files in the database directory.
  • Restart the MySQL instance.

Note: If these methods do not fix the corruption or if the corrupted table uses the InnoDB storage engine, it is suggested to restore data from the last backup or use a third-party MySQL repair tool.

2. Using a Third-Party MySQL Repair Tool

You can use a third-party MySQL repair tool, such as Stellar Repair for MySQL – a software developed by Stellar, one of the well-known software companies in the world of data recovery. This software can repair the corrupt database file, thus helps in fixing the “Incorrect Information in .frm File” error.

Stellar Repair for MySQL can repair all the MySQL database objects, such as stored procedures, views, indexes, tables, unique/primary keys, etc. It supports both MyISAM and InnoDB storage engines. It can save repaired file in various formats, such as MySQL, MariaDB, SQL Script, CSV, HTML, and XLS. The software supports the latest version of MySQL and all the lower versions, including MariaDB up to version 10.8.

Using Stellar Repair for MySQL is super easy. After downloading and installing the software, just follow these instructions.

  • From the main interface, select the data folder that contains the data. Press the OK button.
  • A warning message comes up saying, MySQL service must be stopped. Stop the service.
  • A list of databases appears. Press the Repair button.
  • When the repair process is complete, a message saying “The database is repaired successfully” appears.
  • Press the Save button to save the repaired file.
  • Choose the format to save the repaired data. By default, the selected format is MySQL. Other formats, such as MariaDB, HTML, SQL Script, CSV, and XLS are supported.
  • Connect to the Server. Enter the Host Name, Username, and Password.
  • Press the Save button.
  • The following message appears at the end of the procedure.

To Conclude

When the “Incorrect Information in .frm Fileerror appears, you cannot access the data in the corrupted table. Above, we have discussed the ways to fix this error. If the manual solutions fail to fix the issue and you do not have a copy of the data, then you can use Stellar Repair. This tool can easily repair the corrupt database and recovers all the database objects, thus allowing you to solve this error.

Related posts