Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recover DBs from External HD

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
I use my laptop for development, running XP SP2 with WAMP 2.0

This morning, I was forced to:
a) Copy my c:\wamp directory tree to my external HD
b) Do a fresh install of OS and all programs

Now that I have installed WAMP back on, I would like to load my DBs from my external HD. If I just copy the folders for the DBs, I see them in PHPmyAdming but no tables.

What must I do to restore my DBs with their respective tables?

Thank you all in advance!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
1. Did you shut down MySQL before copying to the external drive?
2. Was MySQL stopped when you copied back?
3. MyISAM or INNODB?

Try 'mysqlcheck -r your_database' from command prompt
or
'REPAIR TABLE tablename' from mysql or phpmyadmin.

I don't use "W", so mysqlhotcopy works for me. Next time may I suggest using mysqldump as a backup?

Mark
 
No, I do not think I shutdown prior to copying files
Yes, MysQL was not running when I copied back
INNODB

Tried mysqlcheck and got a bunch of errors. Each error read like:

"error : table 'dbname.tablename' doesn't exist"
"error : corrupt"

I guess I'll have to dump from operation DBs and restore in my development box - Thing is that I had made some changes to some tables not yet in operations.

Regards,




--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
You could try REPAIR TABLE tablename, but copying the files with the MySQL server up usually won't be recoverable. At least not that I've seen.

Good luck,
Mark
 
Kozusnik,

I have already copied back from operation server. I learned a hard lesson ... don't wish this to anyone.

Regards,


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top