How to restore Mysql database _ MySQL

Source: Internet
Author: User
How to restore Mysql database bitsCN.com

The restoration of the MySql database here refers to how to restore the database through the data files stored in Mysql without normal backup.

Because I plan to re-install the Mysql database on a test machine, the process may be miserable because I simply unmount the Mysql database and I didn't back up the Mysql database used by Discuz and Redmine.

Fortunately, the Mysql program is uninstalled, and all the data files still exist.

The following is the process of restoring the database.

1. Discuz database

The recovery of the Discuz database is very smooth. after the new Mysql version is installed, copy the original database file to the new data directory and restart mysql to see the recovered database.

2. Redmine database

I plan to directly use the above experience to view all the tables, but the error "the table does not exist" is always reported during query ".

Later I checked some information and found that the reason should be that the Mysql engine used by Discuz and Redmine is different.

Discuz uses MyISAM, while Redmine uses InnoDB.

The solution is,

In addition to the copy data directory, remember to overwrite the ibdata1 file.

Below is

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.