How to migrate values (Restore and restore) to the InnoDB database in MySQL.

Source: Internet
Author: User

After a day, I finally got it done.

MySQL has two modes: MyISAM and InnoDB.

If MyISAM is used, the. frm. MYD. myi files will be stored in the data directory, so you can directly move the data to restore it After configuring the permissions.

If it is InnoDB, it is quite annoying. There is only. frm in the data directory (this is only a Data Format). After the data is removed, the original data cannot be restored.

The real data is placed in iddata1 under the Data Directory. Therefore, if this file exists, there is still hope to restore it.

 

But I tried allArticleThe system still prompts "no table in the Database ".

Finally, I found the answer. That is the configuration file of my. ini. There is an item in it:

Innodb_data_home_dir = "C: \ Program Files \ mysql \ MySQL Server 5.1 \ data"

You only need to set the above address as your correct address.

Remember to restart MySQL (enter net stop MySql in cmd, and then Net start MySQL) to restore it...

It took me a day to discover the problem, hoping to help my friends who encountered the same problem.

 

In summary, it is better to use MyISAM by default for MySQL and it is easy to transfer. Databases are separated from databases and will not be mixed together. So you can set the default items in my. ini:

Default-storage-engine = MyISAM

 

Good luck !!

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.