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