Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Completely uninstall mysql-server
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.
/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
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.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×