A jsp code segment connecting to mysql on the internet, giving the database backup file, but only frm,
Each mysql table has three files ,*. frm describes the table structure ,*. MYD Stores Table data records ,*. MYI is the index of the table,
After checking the information, only frm files can be imported.
The process is as follows:
1. In the data directory under the mysql directory, find the name of the database where the table to be imported is located and put the frm file in it. For example, here I am offer. frm and the database name is netshop,
Put it in the database netshop directory, and show tables in mysql displays the following
The table is displayed here, but the following error is prompted when desc offer
2. Create the following two files in the same directory as offer. frm. The file content can be blank:
Offer. MYD and offer. MYI
3. Use the MYSQL Data Table recovery command repair on the MYSQL command line to restore the table, as shown below:
According to the results, the recovery command is successfully executed. Run the desc command to test it:
Author: jason0539
Weibo: http://weibo.com/2553717707
Blog: http://blog.csdn.net/jason0539 (reprinted please explain the source)