views:

660

answers:

1

Hi,

I have a recovery disc image which contains the datafiles for mysql server. The original server is unavailable - all I have is the datafiles (programdata, program files etc). I am not able to make a mysqldump file.

On the new server, I've installed the exact copy of mysql server, and copied the files/folders (all the myd myi files) from the disc image to the new server. After restarting the mysql service, I can see the list of my databases in mysql administrator.

However, when I try to view a table, I get a "1146 The table {dbname}.{tablename} does not exist."

I tried running myisamchk but this says there is n problem (at least no error is displayed)

Can anyone help?

Bob

+1  A: 

You will need a copy of the corresponding .frm files, which contain the format information MySQL needs to read the raw row data from .myd/.myi or ibdata files. Without the .frm files, MySQL does not know the tables are even supposed to exist (which is why they're not found, and myisamchk doesn't see any broken tables).

If you don't have these files, you may be in trouble. You should be able to reconstruct the .frm by re-CREATEing the tables from scratch, then stopping the server and dropping the .myd/.myis over the empty versions. But you will need to know the exact datatypes and indexes that were originally used in the schema. (“Very difficult repair”)

bobince
Cracking. I'd already copied across the frm files also, but had not copied the ib_logfile0, ib_logfile1 and ib_data files.After stopping the serverice, copying these files, the databases were all there + working after restarting the service.Thank you!
Bob
Phew! I was getting worried for your data there!
bobince