A friend of mine mysql linux server died and I managed to get almost all the data from the hdds... What can I look for to recover his databases and data? Where are they stored and in which files? How can I put those files under a new and healty mysql installation?

Thanks a lot for your time.

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

You can check mysql configuration file /etc/mysql/my.cnf. Usually, you will find a line like:

datadir         = /var/lib/mysql

1- Stop the new mysql server.

2- Copy the datadir including all the files and folders.

3- Check the files owner / permissions.

4- Start the new mysql server.

link|improve this answer
feedback

It's installation-dependent, but most MySQLs I've seen keep the databases under /var/lib/mysql, one subdirectory per database.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.