0

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.

1

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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