I had my disk space full due to which I couldn’t delete binary logs using sql command. So, I took a backup deleted some bin files manually using SFTP. After this mysql start messing up, so I uninstalled and installed again but it isn’t working.
I ran following code to uninstall:
sudo apt-get purge mysql
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
And for installing I followed this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
And now I getting an error
“Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”
Please help me out
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Hi there,
I could suggest following the steps from this answer here on how to completely uninstall MySQL:
https://www.digitalocean.com/community/questions/completely-uninstall-mysql-server
Let me know how it goes after that.
And if you are still seeing the error, can you check the MySQL status with:
And also check your MySQL error log and share the output here?
Best,
Bobby
So, I tried uninstalling and reinstalling and I’m getting this error