Celeb Glow
updates | March 19, 2026

How to handle missing mysqld.sock socket?

I am new to MySQL.

I naively tried to uninstall my MySQL from by Ubuntu 20.04 before attempting to reinstall it again.

In order to do this, I followed the instructions listed in the accepted answer in this post.

Alas, upon reinstallation, trying to run sudo mysql returned ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I checked out /var/run/ and it contains no mysqld folder...

How can "recreate" the mysqld socket? Any help will be appreciated!

3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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