0

Please help!

There are server issues and MySql is no longer running on our server (Ubuntu). The service is not recognized and needs to be reinstalled. Unfortunately, the database has not been backed up for 48 hours and that is a lot of information.

How do I reinstall MySql AND keep all my database data? Please note - I can't access mysql at all. I can't use command line mysql nor phpmyadmin.

Thanks in advance and let me know if I am missing important details.

1 Answer 1

2

If the database files are accessible, you can follow these steps:

  1. mv /var/lib/mysql /var/lib/mysql.bkp
  2. sudo apt-get install mysql-server
  3. sudo /etc/init.d/mysql stop
  4. mv /var/lib/mysql.bkp /var/lib/mysql
  5. sudo /etc/init.d/mysql start

It should work if you don't have any table file corruption.

Your Answer

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

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