After running the command
mysql -v
in Ubuntu, I am getting the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
MySQLubuntu-16.04
After running the command
mysql -v
in Ubuntu, I am getting the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Best Answer
I think this is because you are using client software and not the server.
mysql
is clientmysqld
is the serverTry:
sudo service mysqld start
To check that service is running use:
ps -ef | grep mysql | grep -v grep
.Uninstalling:
Re-Installing:
Backup entire folder before doing this: