I have my own Ubuntu 16.04 server system and MySQLdb in it. And today, I installed MariaDB on the system without noticing installed Mysql. ( with "sudo apt-get install mariadb-server.." command )

I realized there is a mysql-server when finished installing mariadb. So, I removed mariadb with "sudo apt-get remove mariadb-server.." command.

And now, I can't access mysql db with error 2002. ( Naturally, I can't start mysql also. )

How can I fix this situation?


  • Did you reinstall mysql-server after uninstalling mariadb? is it running (systemctl status mysql.service) – steeldriver Mar 26 '17 at 12:32
  • I reinstalled and finally restored my database with original physical files ( /var/lib/mysql ). Thanks :) – wyldecat Mar 27 '17 at 5:46

Your Answer

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

Browse other questions tagged or ask your own question.