Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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