- Home
- SQL
- 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' (2)" Code Answer's
You're definitely familiar with the best coding language SQL that developers use to develop their projects and they get all their queries like "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)" answered properly. Developers are finding an appropriate answer about ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) related to the SQL coding language. By visiting this online portal developers get answers concerning SQL codes question like ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Enter your desired code related query in the search bar and get every piece of information about SQL code related question on 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 '/tmp/mysql.sock' (2)
sudo chown -R _mysql:mysql /usr/local/var/mysql
sudo mysql.server start
Source: stackoverflow.com
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# Remove mysql
sudo apt-get remove --purge mysql\*
#update repositories
sudo apt update
# Reinstall it
sudo apt install mysql-server mysql-client
# Test if it runs
sudo mysql
# You can install also thes pachages. Optionnaly
sudo apt install php
#mesabo youbeyou
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sudo /etc/init.d/mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sudo apt-get install mysql-server
Source: stackoverflow.com
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
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
For mac:
The mysql server is not running.
brew services mysql start
All those coders who are working on the SQL based application and are stuck on ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) can get a collection of related answers to their query. Programmers need to enter their query on ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) related to SQL code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) for the programmers working on SQL code while coding their module. Coders are also allowed to rectify already present answers of ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while working on the SQL language code. Developers can add up suggestions if they deem fit any other answer relating to "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)". Visit this developer's friendly online web community, CodeProZone, and get your queries like ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) resolved professionally and stay updated to the latest SQL updates.