Report this

What is the reason for this report?

Completely uninstall mysql-server

Posted on June 21, 2020

Hi there, first of all I need to make some history to tell why am getting to this point.

A few days ago, making a multisite WordPress installation I lost access to database. This I solved it without breaking my head.

Yesterday I got notified that my WordPress was down, but what a surprise, my disk was full (25G). So I follow thees steps to solve that, then I saw that the problem was in /var/lib/mysql with a lot of files binlog.000000 ~100M size. So I delete them all with rm, I don’t know if that was the right way.

Then all the problems start. I try to enter to mysql console, but it is imposible, always get this massage: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I’ve followed this tutorial and many others like this one, but nothing.

The directory /var/run/mysqld/ has owner and permissions drwxr-xr-x 2 mysql mysql 40 Jun 21 09:19. I’ve restarted mysql.service many times, but the mysqld.sock file is not created.

Last thing I did was uninstall mysql-service:

sudo apt remove --purge mysql-server
sudo apt purge mysql-server
sudo apt autoremove
sudo apt autoclean
sudo apt remove dbconfig-mysql

I’ve installed again, but when I try to access to mysql console get the same error again.

My droplet is SO Ubuntu 20.04 and MySQL version 8.0.20. I don’t know if there could be some issues in this latest versions of Ubuntu and MySQL.

I don’t care a lot to lose all my data, be cause it is a new droplet and I have almost nothing there, but I like to fix this problem in the right way.

Thank a lot for your help.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.