MySQL Import Database _ just use FRM to import table structure to MySQL

Source: Internet
Author: User
Tags import database mysql command line mysql import mysql import database

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.