Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I Want to use a mysql database from a backup of a non-working server on a new computer

My database is from a backup of the non-working server.

My database is the teachercenter folder that was on the server, and contains files for each table name with the extension *.frm.

I copied the database from:

C:\Users\xxx\Downloads\wamp-saved\wamp\bin\mysql\mysql5.1.36\data\

And pasted that folder on my computer here:

C:\wamp\bin\mysql\mysql5.6.17\data

I realize the the two mysql's were different versions, but I'm just trying to use the database files.

When I start up PHPMyAdmin on the new computer, it shows the teachercenter database in the list of databases.

Also, if I click the plus next to the teachercenter database, I can see a list of my database tables!

But if I click on teachercenter database itself, I get error:

No tables found in database.

How do I get mysql to recognize and let me operate (PHPMyAdmin) on the teachercenter database on the new computer?

I tried to start/use wampmanager.exe, but I don't see it running to use it's menus.

like image 263
agershon Avatar asked Nov 09 '22 06:11

agershon


1 Answers

THE PROBLEM IS SOLVED:

At: stackoverflow.com/questions/10934745/… a simple answer to my probelem is given, as follows: "Yes this is possible. It is not enough you just copy the .frm files to the to the database folder but you also need to copy the ib_logfiles and ibdata file into your data folder." I copied the ib_logfiles and ibdata file into my data folder, and Voila! PHPMyAdmin was completely happy with the database and its tables and I could do SQL exports of table records.

Summary: To make use of a MySQL database of *.frm files that your MySQL doesn't understand, simply copy the ib_logfiles and ibdata file from whereever you got the .frm files from, and put these two files in the data folder next to the database you want to use. Once you do that, the MySQL database engine will recognize your database, and you can all PHPMyAdmin operations on your fully operational database.

like image 114
agershon Avatar answered Nov 14 '22 23:11

agershon