Today, working on the MySQL database table on Navicat, suddenly no response. The MySQL service is also terminated after the restart. Then start the service, check the table, find a table card is gone, add a table again. Reported a mistake:
Error:tablespace for table ' database '. ' Temp ' exists. Please DISCARD the tablespace before IMPORT.
But show databases looked at the moment there is no this watch AH. The online search for a long time did not find a similar situation, took several hours.
Finally, a solution was found as follows:
1. Close all MySQL operations and stop the MySQL service.
2. Locate the database file under the installation directory, under the Data folder in your installation directory, and then open the folder of your corresponding database name. Locate the file that corresponds to the table, and then delete the damaged file.
The file name in the database should be corresponding to your table name one by one, a table, two files, a data file, a log file, in addition to this there is a "db.opt" file do not delete. Other garbled files, and the original files you have gone wrong are all deleted.
3, after the restart of the MySQL service, re-add the same name of the table can be added successfully.
Error:tablespace for table ' database '. ' Temp ' exists. Please DISCARD the tablespace before IMPORT. Workaround