Data dictionary information of MySQL server is stored in the FRM files, which is stored in database directories and the Innodb storage engine keeps the information in individual data dictionary in tablespace files.
While moving FRM files, if the server gets crashed in halfway then the data dictionary location of FRM files might end up without synchrony with the locations recorded in the InnoDB inner data dictionary. If any such situation happens then the MySQL database will become inaccessible and inconsistent and in order to resolve this issue you need to use MySQL Repair software.
There are several symptoms which indicate the out-of-sync data dictionary situation and among them the most common problem is the “Create Table” statement does not work. In this situation the error log of the MySQL server need to be checked. If the error log indicates that the table already exists, then the InnoDB internal data dictionary has an orphaned table in InnoDB tablespace files which does not corresponds FRM files.
You can drop the orphaned table, using the steps given below in the error message. But in case you are unable to execute the “Drop Table” command successfully, then this issue might have caused by the name completion in MySQL Client. So, in order to sort this issue you need to start MySQL client with –skip-auto-rehash option then try to execute “Drop Table” command.
Another symptom which indicates the out-of-sync issue with data dictionary is the error messages which is thrown when you attempt to open the database table. The error goes like this –
"ERROR 1016: Can't open file: 'child2.InnoDB'. (errno: 1.”
In error log of MySQL, you may find the below message:
“InnoDB: Cannot find table test/child2 from the internal data dictionary
InnoDB: of InnoDB though the .frm file for the table exists. Maybe you
InnoDB: have deleted and recreated InnoDB data files but have forgotten
InnoDB: to delete the corresponding .frm files of InnoDB tables?"
This behavior of MySQL database clearly indicates that the corruption of database tables has occurred and backup of the lost data is required for the restoration.
In case if the backup is not available (as in most of the cases) or has corrupted, then to make the MySQL server work properly you need to use MySQL Repair software which is an third-party software but is efficient enough to repair and recover the corrupt and damaged MySQL database and to recover the lost, corrupt, deleted and missing data from MySQL database server. So, if you have also faced the FRM file corruption issue then use this software to resolve the problem instantly.