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

##	ERROR 2002 (HY000): 
##	Can't connect to local MySQL server through socket 

#### Follow below steps and you good to go... ####
sudo dpkg-reconfigure mysql-server-{version_number}
##version_number should be mysql version number installed
## Now try login in mysql shell
sudo mysql -u root -p

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (146 "Lock timed out; Retry transaction") error 2002 (hy000) can't connect to local mysql server through socket remove ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error 2002 can't connect to local mysql server through socket [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) sourcebans ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) digital ocean ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) RROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Enter current pa ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) rhel error 2002 (hy000) can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' ERROR 2002 (HY000): Can't connect to MySQL server on (115) ERROR 2002 (HY000): Can't connect to MySQL server on error 2002 (hy000) can't connect to mysql server on through socket digital ocean error 2002 (hy000) can't connect to local mysql server through socket in ubuntu ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111) error 2002 can't connect to local mysql server through socket '/var/run/mysqld/mysqld sock 2 (MySQLdb._exceptions.OperationalError) (2002, "Can't connect to local MySQL server throug h socket '/var/lib/mysql/mysql.sock' ( (2002, "Can't connect to MySQL server on 'localhost' (10061)" mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' windows error 2002 (hy000) can't connect to mysql server on 'localhost' (10061) No connection. Trying to reconnect... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR: Can't connect to the server mac ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) error 2002 (hy000) can't connect to local mysql server through socket rasberry ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (62) Got error: 2002: "Can't connect to local MySQL server through socket '/tmp/mysql.sock' centos 8 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in cli ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) macos Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' error 2002 (hy000) can't connect to local mysql server through socket '/tmp/mysql.sock' (2) linux ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) Got error: 2002: Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock mariadb ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) macos ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' RROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" 2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) error 2002 (hy000) can't connect to local mysql server through socket '/run/mysqld/mysqld.sock' ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to MySQL server on '' (115) cERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' linux mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) docker ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) error 2002 can't connect to local mysql server RROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ERROR 2002 (HY000): Can't connect to local MySQL server through socket docker ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' droplet digitalocean ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' ubuntu ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061) Connection error SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) mysql default passowrdERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) wsl2 error 2002 (hy000) can't connect to local mysql server through socket '/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)") mac os ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) mysql macos Step 2/4 : RUN mysql -u root ---> Running in ce3e473327a3 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) an't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) mysql.sock being deleted mysql 2002 Can't connect to local MySQL server through socket '/var/run/mysql.in popd/mysqld.sock' (2) can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2) Ask
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source