1

I know, it is really sad trying to export a database just by copying the data folder! But I have a hard disk with an important database inside and I don't know how to export this database onto my actual system (winxp - mysql 5.0.37).

So, i've copied old_harddisk/program/mysql/data/coge2010 to mypc/programs/mysql/data/coge2010

Result:

  • I see cogemilla (4) on my phpMyAdmin databases summary (it's correct!!! my 4 tables!)
  • If I click the database, I see just 1 table (oh no!)
  • On the mysql error log file I find messages like this one: "...[ERROR] Cannot find table coge2010/soci from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html how you can resolve the problem."

Any ideas?

jesterjunk
  • 2,342
  • 22
  • 18
Marco Panichi
  • 1,068
  • 1
  • 18
  • 31
  • try recreating the schema alone. It might be an error because of schema unavailability. – Kris Sep 23 '11 at 10:44

3 Answers3

2

You should create a dump and import it on the new server.

In Command Prompt type the following to create the dumpfile:

mysqldump -h host -u user -p databaseName > dumpFile.sql

To import the database :

mysql -h host -u user -p databaseName < dumpFile.sql
Mircea Soaica
  • 2,829
  • 1
  • 14
  • 25
0

This post may help you.

Another post which may help you.

A mysql table is defined by 3 files (FRM/MYD/MYI). In your case the FRM file is missing into the database folder.

If you can run the mysql server of the old hard disk it is easier to do a dump of your database. The following link shows you how to do this

Community
  • 1
  • 1
Fred
  • 4,846
  • 1
  • 23
  • 21
0

You can only copy InnoDB tables if: 1. Your database is stopped. 2. You copy all InnoDB files (ibdata* ib_logfile* /*.ibd

You could use dump/restore to copy a single table.

You could user 'ALTER TABLE sometable ENGINE=MyISAM' to convert it to MyISAM and then copy the MYI,MYD and FRM.

Percona XtraBackup can do single table restores if you're using Percona Server.