Question

My server recently crashed and I have backed the Mysql files using raid.

BACKED UP DIRECTORY

/backup/var/lib/mysql

I installed new OS(RHEL5.3) to my server and I want to restore my DB to MySQL

How do I do this?
I know you can ssh mysql > the dump files
but, these backed up files are not in DUMP.
They are separated as .MYD .MYI .frm etc..

Was it helpful?

Solution

I guess your backup file is not in the same server as your database.

Try:

scp -r /backup/var/lib/mysql/* DB_SERVER:YOUR_NEW_DATABASE_DIRECTORY

Then

ssh DB_SERVER
.. restart your mysql daemon (easier)
.. or flush privileges, flush tables ...

OTHER TIPS

Copy these files directly to your mysql data directory, and you will be able to access them in MySQL. That should help you!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top