Answers for "ERROR 2002 (HY000): Can't connect to MySQL server on"

SQL
11

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

sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start
Posted by: Guest on May-12-2020
4

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

> ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
> 
> service mysql start or service mysql start
Posted by: Guest on June-04-2020
0

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
Posted by: Guest on August-18-2020
1

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

sudo apt-get install mysql-server
Posted by: Guest on October-10-2020
-1

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

sudo /etc/init.d/mysql start
Posted by: Guest on March-14-2021
1

ERROR 2002 (HY000): Can

# This is usually caused by the fact that the
# MySQL Server isn't even running
# On Windows, check your services, if its not running
# start it, or install and start it.

# On *nix, for this example Debian based
# Firstly see if it's even running
ps aux | grep mysql

# If you dont see any process other than your grep call,
# It's not running

# Assuming you have mysql-server installed
# Start it
sudo /etc/init.d/mysql start

# Otherwise install it, configure and start it up as above
sudo apt-get install mysql-server

# Goodbye 2002
Posted by: Guest on February-21-2020

Code answers related to "ERROR 2002 (HY000): Can't connect to MySQL server on"

Code answers related to "SQL"

Browse Popular Code Answers by Language