0

After a crash of my PC I'm left with several databases (27Gb in total) that are left on my data drive, while my OS drive (Windows 7) is gone.

I've reinstalled the machine by now (Windows 10) and set up a new MySQL server (via installation of XAMPP). I would like to recover the old databases and add them to the new MySQL server.

What would be the best way to copy/move/restore these databases to the new installation?

The old MySQL install was version 5, but I have no idea what specific version. I could set up a new MySQL install version 5 if needed, but I'd prefer a solution that works regardless of version (within reasonable limits, of course).

I've browsed through two questions that are similar: How to restore MySQL database from Files and Can I restore a MySQL table from a file (non-sql) backup? but they don't address the possible difference in version.

Thanks!

  • You are restricted to one major version difference with upgrades. So 5.7 and 8.0 or 5.6/5.7. Copy all files the the lowest major version. Upgrade are one way. There is no downgrades. – danblack Jul 9 at 22:54
0

Danblack already mentioned being restricted to one major difference, but after trying to copy data files back and forth I was not able to get my database up and running.

In the end I set up a Virtual Machine with Windows 7 and started installing MySQL versions starting from version 5 until I got to a working database.

Once my database was up and running in the VM, I could then export all schemas from there to be imported later on in my Windows 10 database.

Not the most elegant of solutions, but it worked in the end, and could help other people who are faced with the same situation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.