I have a backup of the entire xampp/mysql folder. How can I use it to recover my old db on a fresh installation of XAMPP?
Simply copying the old xampp/mysql folder to new xampp leads to mysql errors like:
InnoDB: Table veno/sls37_finder_links_termsc in the InnoDB data
dictionary has tablespace id 1171, but tablespace with that id or name
does not exist. Have you deleted or moved .ibd files? This may also be
a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files
MySQL automatically removed, but the table still exists in the InnoDB
internal data dictionary.
解决方案You cannot copy a database folder that has InnoDB tables because
InnoDB storage engine maintains a symbiotic relationship between the
InnoDB tables' physical files (frm and .ibd) and the data dictionary.
Recommendation: It might be late in your case, however, before you move to another server, it is a good idea to export your databases to a sql file and Import it from phpmyadmin, Mysql Workbech, SQLyog or terminal
Export:
mysqldump -u user -p password database_name > database_name.sql
Import
mysql -u user -p password database_name < database_name.sql