[MySQL] Restoring data from MYD and FRM file

The Frog

Perch
From the server, I downloaded a particular table's MYD, MYI and FRM files.

Now I'd like to get this table in its entirety onto the MySQL Server database on my laptop. I do not have the option of taking a backup of the database, I must work with just these three files, and just the mysql command prompt.

So how can I restore these tables?

Do I just place them into the data directory corresponding to the database that I've created for this?

Thanks.
 
205 replies and zero answers?! I couldn't figure it out either, I had to go through another route.


Here's what I did: I created a database on my laptop's MySQL, and placed these files into the data directory. I reindexed.

Then I had to write a program which went through each table, and first generated the CREATE table statement, and then the INSERT INTO statements, saved it all to various text files.

Then, I went out and had a cigarette. The cigarette solved everything. :)
 
Back
Top