2

so I have a little problem. Okay a huge problem.

We had problems with our Ubuntu Precise server and our /usr directory was removed. This means that all commands related to mysql stopped working as well as phpmyadmin. However, in the /var/lib/mysql directory you can find all of our databases.

To simply state my question, is it possible to just copy that /var/lib/mysql directory over to a new install of our server and they will be there? I would normally just use phpmyadmin to backup or various other commands however mysql commands will not run.

Will this work? How much information will be missing?

Or of course is there a safe way to backup all databases without having phpmyadmin or mysql commands on the server.

Best regards and many thanks, JJ

1

1 Answer 1

1

Yes, you can copy db files and all will work fine with the same MySQL version.

To get a consistent backup, stop the server or lock and flush the tables.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.