Search code examples
mysqlphpmyadminxamppinnodbrecovery

Recover MySQL Database from raw data files [XAMPP | MySQL | InnoDB]


Okay, So my PC was starting to run a bit sluggish so I reset windows, keeping my files. Because my brain wasn't turned on I forgot to make a backup of my MySQL DB beforehand. I still have all of the raw files, so I still actually have the database but so far have found no way to get it back into the new XAMPP/MySQL installation.

This is what is in my (OLD) ../xampp/mysql/ folder:

Screenshot of file explorer showing mysql folder

If any of you awesome people could help me get the raw files back into the MySQL DB, I would be beyond appreciative.


Solution

  • Try to rename the data folder in the new xampp/mysql to something else like data1 or data_backup, and copy the data folder from the old xampp/mysql to the new one to replace the one you renamed above.

    NOTE: Please refer to Michael Longhurst's, the OP's comment above in case you had a password on the previous installation.