MySQL not seeing my database fully after restoration from backup

I reinstalled XAMPP which included MySQL. Prior to the reinstall, I made a backup of the 'C:\xampp\mysql\data' subdirectory, which is where all the databases are stored.

When the new install finished, I copied back the databases in the 'data' subfolder into 'c:\xampp\MySQL\data'. I then went to MySQL Workbench to see if I can access any of them. Refreshing the view made all the databases appear, but when I do a SELECT on any of the tables in any of those databases, I keep getting a message that says the table does not exist, so apparently something is wrong.

How can I make the new install of MySQL see my databases as it used to? Thanks.
Who is Participating?
Dan CraciunIT ConsultantCommented:
Dan CraciunIT ConsultantCommented:
Using phpmyadmin or Mysql Workbench, repair the tables (in phpmyadmin it's under "Operations" in table view, or under Structure->With Selected->Repair table in db view).

elepilAuthor Commented:
To Dan Craciun.

When I click on the database on the left, I can see the table names, but nothing is showing on the main panel to the right.

I tried following your instructions on another database that I know is good, and it listed all the tables in the main panel, but not for the ones I'm having problems with.

You'd think since MySQL neatly bundles up a database in its own folder in c:\xampp\mysql\data, that just backing up the folder would contain all the info MySQL needs to recognize it.

What is the proper way of backing up a database so that one can restore it with confidence that it will be readable by MySQL, do you know?
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

elepilAuthor Commented:
I guess I learned my lesson, I should backup these databases. I think I've lost them for good. Thanks for your help.
Dan CraciunIT ConsultantCommented:
Are these used for production or development?

XAMPP is great for quick deploy when developing an app/site, but I would not use it in production.

And even for development/testing, a Raspberry PI is cheap and small (about the size of a pack of cards).
Just install Raspbian and Mysql and you have your own dedicated server.

Make sure you save an image of your SD card from time to time (they tend to wear out after a while, in my experience).

Anyway, any solution you use, make sure you have an automated method for daily backups. If you have to do it manually you'll forget.
elepilAuthor Commented:
The databases I lost were still in development, and they didn't have too much data yet. But I'm good. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.