0

First of all, I don't know very much about Ubuntu. It's Ubuntu 16.04 Server (64 bits).

I needed to install a MySQL database, using apt-get install mariadb-server. It worked, it's been installed but it asked me no password or anything. Unable to set a password, I just uninstalled it using the apt-get remove.

Then I wanted to try using apt-get install mysql-server, giving me an error. Well, I searched the web for solutions, and I've used commands I don't even know what do they do. And now, I have this mess where I can't install packages.

It seems that both are already installed, but when I try to do something with them:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

And I can't even install gedit to try and edit a file that's supposed to have a solution to this problem.

Argh... What the heck can I do? I'm very lost right now, and I'm afraid that if I can't solve this, I'll have to format and reinstall everything.

Ubuntu command terminal image

Thanks for your help.

1 Answer 1

0

Don't reinstall. If you don't have any valuable data in your databases, you can try this :

sudo dpkg --remove --force-remove-reinstreq mariadb-server

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.