Migrating old MySQL files to new MySQL? Please help

lord_spaceman

Expert Member
Joined
Jun 6, 2005
Messages
1,470
Reaction score
0
Location
Durban
Hi guys

I recently installed Windows and Mysql on a new PC, but can't seem to migrate my old data.

I currently have .opt and .frm files, but when I copy to the new location, MySQL Administrator says "Unknown table engine InnoDB" / "Corrupt"

How I successfully get my old data back into the MySQL Administrator?

Thanks

PS: I know I should have exported the .sql files, but I didn't.
 
Last edited:
Have you enabled InnoDB in your MySQL configuration? The default engine is MyISAM.
 
lord_spaceman, normally it's easiest to install an older MySQL server again, in a different location (yes, you can have multiple MySQL servers) and export the data, then re-import it.
 
lord_spaceman, normally it's easiest to install an older MySQL server again, in a different location (yes, you can have multiple MySQL servers) and export the data, then re-import it.

+1

I would do an export and import
 
Do you still have access to the old machine, or at least the old hard drive, to boot it up?

A few things you need to be aware of:

1. You cannot transfer the data files between architectures. If your old Windows is 32bit, and the new one is 64bit, it won't work.

2. Upgrading the to a newer major version of MySQL will require a table space upgrade. I haven't done this on windows, but in the unix world mySQL comes with a script 'mysql_upgrade' which you run after updating the software. This does a table check/repair and executes an sql script that updates the tables.

3. Always make backups! The best way to backup a MySQL database is to export to a .sql file.
 
Top
Sign up to the MyBroadband newsletter
X