5

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.

agershon
  • 61
  • 4
  • 1
    Instead of copying the frm files directly I would export the datasbase to a .sql file and then import it. It most likely is the case the database types are different; notably frm is for myisam and would not work with innodb. – Shawn Aug 20 '15 at 17:32
  • Unfortunately the original server is not available for sql export. I see that the newer wamp server defaults to engine innodb. However, I made a new table on the new wamp, and it used innodb. But when I looked at the data folder, it had three files: db.opt, test@0020table@00201.frm, and test@0020table@00201.ibd. – agershon Aug 20 '15 at 20:27
  • I need to salvage the tables I have. Can I install an old mysql into my wamp server that uses myisam for a storage engine? Can I instruct the current wamp server mysql to use engine myisam to look at these files that I have? – agershon Aug 20 '15 at 20:40
  • Can I copy the whole wamp folder tree from the backup and plop it onto my C: drive and fire it up? That would give me an mysql that understands .frm files. Then I can do an sql export of the tables. But how to get that copied wamp folder into a working wamp? – agershon Aug 20 '15 at 20:47

2 Answers2

1

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.

agershon
  • 61
  • 4
0

Because you can't be sure that the MyISAM storage format backwards compatible, your safest option is to install MySql 5.1.36, use mysqldump to export your entire database to plain SQL, install MySql 5.6.17 and then import your data using SQL.

Also, this probably gives better results because your indexes are rebuild.

Rein
  • 478
  • 3
  • 3
  • THE PROBLEM IS SOLVED: At: http://stackoverflow.com/questions/10934745/restore-the-mysql-database-from-frm-files 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 databse 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 tables and I could do SQL exports of table records. – agershon Aug 24 '15 at 14:53