Forum Moderators: phranque

Message Too Old, No Replies

copying over old SQL tables

         

w_s_o

9:01 pm on Jul 15, 2005 (gmt 0)

10+ Year Member



My dedicated server crashed yesterday, and the web hosting company had to give me a new server. But they were able to restore a complete copy of my old C: drive to a new D: drive. So I have access to all of my old data.

My question is this--the only web site that we have on this server uses MySQL for practically every page on the site. The guy who configured all of that is no longer involved with us. MySQL is part of the default server setup that I was given last night. But I don't know how to find the tables from my old C: drive (now D:) and copy them to the appropriate spot on the new C: drive.

Is there a MySQL expert out there that understands the file structure of that system and can help point me to some direction on how to locate the pertinent old files and where to move them in the new hard drive?

Thanks,
Tom

Anyango

10:50 pm on Jul 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tom!

Though it would be a bit complicated process but i think it would work 100%.

ThankFully MySQL saves its data in files which we can pick up and move to another location and put in the appropriate directories and they would work at new location.

Solution 1 )

in the "data" folder of mysql installation on your old server. you can see a folder each for every database that was configured in your previous server. now in those folders you ll see files like

.MYD
.FRM
.MYI

Just pick up those files along with the database named directory and copy it over to the same "data" folder of your mysql installation on your new server. now logon to your mysql using any web interface and you ll see your new database in there. ;)

Please let me know if this needs some clarification or you would like to discuss more solutions to this if this doesnt work.

Thank You

Kami

w_s_o

1:33 am on Jul 17, 2005 (gmt 0)

10+ Year Member



Kami,

Thanks a million. This worked perfectly. I created an empty database just to be certain of where to copy the data. I found the data from the old drive just as you said and was very happy when it all worked. This was a huge help.

Tom

Anyango

7:11 am on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Tom!

Great Your database is up!.

Have Fun!

Cheers!

Kami