After mysql restores the database, the solution that prompts the table does not exist error: 1146: Table doesn't exist

* Import data file into MySql database

Remember to backup the data folder under the installation directory when deleting mysql

Insert picture description here
As shown above:
As long as you find the data folder in the installation path of Server data files, copy all the backed up data files.
That is:>全部导入!

Import the .frm file. Note that the ib_logfile0, ib_logfile1, ibdata1 files should also be added in the data directory.

If it still doesn't work, replace the ibdata1 file in the data file storage directory you set with the backup ibdata1 file. The location configured as shown below

Pro test ,,,, I set up a folder to store during installation, solved in this step
Insert picture description here

The above can basically solve the problem
=============================================== ================================================== ================== Description:

Otherwise, only the table name can be found in mysql (in fact, a .frm file is a table in the corresponding database.)

It cannot be operated on.

For example, you have some databases in your original mysql. You can backup the original data to the same directory first. (May change the name system will prompt another program is using this file, at this time you can go to the service of the control panel, turn off the mysql service first, wait for the name change, import everything and then start the service)

Then build another data, and import the .frm into the database name.

Stop the service can be stopped by the service in the management tool, or use cmd to open the dos interface and enter net stop mysql, start with net start mysql;

As long as the old ibdata1 covered with the original, and then copy the relevant database in the past, and then restart the database, ok, after entering the table you can not operate if the data table is probably already damaged.
(If not reported 1146 error, it is recommended to restart Take a look at the machine)

Published 43 original articles · praised 2 · visits 978

Guess you like

Origin blog.csdn.net/study_azhuo/article/details/105657023
Recommended