سؤال

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..

هل كانت مفيدة؟

المحلول

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 ...

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top