0
After trying to install LAMP package on Ubuntu 16.04, I am getting the error:
ERROR 2002 (HY000): Can’t connect to local Mysql server through socket '/var/run/mysqld/mysqld.Sock' (2)
I have reinstalled 2x all Mysql;
apt remove mysql*
and apt- purge mysql*
.
I tried to install Mysql 5.6 and 5.7 and both return the same error.
Installed version of PHP:
PHP 7.0.11-1+deb.sury.org~xenial+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend Opcache v7.0.11-1+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
Apache:
PHP 7.0.11-1+deb.sury.org~xenial+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend Opcache v7.0.11-1+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
Which command you used to install mysql ?
– Roknauta
@Douglas, I tried with
apt-get install mysql-server
(this installs 5.7), and also tried to add the ppa of version 5.6.– RFL
Right, and how are you trying to access the mysql in which returns this error ?
– Roknauta
mysql -u root -p
– RFL
Okay, I believe I can help you: http://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq
– Roknauta
@Douglas, I had already seen this topic and as Voce can see it is related to the absence of a file, which is not my case...
– RFL