A web-connected JSP code snippet for MySQL, which gives the backup file of the database. But there is only frm,
Each table in MySQL has three files. Individually, *.frm is a descriptive narrative of the structure of the table. *. MyD saves the data records for the table. *. Myi is the index of the table,
Check the information, the original only frm files can be imported.
Steps such as the following:
1. In the Data folder under the MySQL folder, find the name of the database where you want to import the table, put the frm file in, for example, I am offer.frm, the database name is NetShop,
After you put it in the database NetShop folder. Show tables Demo sample in MySQL for example the following
Here the table is displayed, but the Desc offer will prompt the following error
2,The following 2 files are created in the same folder as Offer.frm, and the file contents can be empty:
Offer . MyD and Offer.myi
3. On the MySQL command line, use the MySQL data table restore command Repair command to restore the table. For example, the following:
The recovery command runs successfully, depending on the results. Below with the DESC command test:
jason0539
Weibo: http://weibo.com/2553717707
Blog:http://blog.csdn.net/jason0539(reprint please indicate the source)
MySQL Import Database _ just use FRM to import table structure to MySQL