LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I extract the databases from raw files? (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-extract-the-databases-from-raw-files-639957/)

nyheat 05-05-2008 02:10 AM

How can I extract the databases from raw files?
 
My hard drive was dying, so the only way to grab my MySQL databases was to backup the entire folder.
I've got all the databases under the mysql folder, but now I'm at a loss as to what I should do with them.

I've reinstalled the OS on a new hard drive, should I reinstall MySQL and simply paste the files in the same location they were previously?
Or is there an alternative (better) way to do this?

bathory 05-05-2008 03:08 AM

Quote:

I've reinstalled the OS on a new hard drive, should I reinstall MySQL and simply paste the files in the same location they were previously?
Yes assuming that you install mysql the same way as before, so the datadir remains the same.
Quote:

Or is there an alternative (better) way to do this?
Since you didn't use mysqldump to export your databases in sql format you have to use the above method.

Regards

nyheat 05-05-2008 11:16 AM

Thanks for the quick reply bathory.
I wasn't able to use mysqldump because it wouldn't run due to mysql.sock errors.


All times are GMT -5. The time now is 08:00 PM.