MySql installation error [closed]

0

After trying to install the LAMP package on Ubuntu 16.04, I'm getting the error:

  

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

I've reinstalled all MySql 2x;

apt remove mysql* and apt- purge mysql* .

I tried installing MySql 5.6 and 5.7 and both return the same error.

PHP version installed:

  

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

    
asked by anonymous 30.09.2016 / 17:21

1 answer

1

I was able to resolve by restarting the pc and installing

sudo apt-get install mysql-client-core-5.7

and then

sudo apt-get install mysql-server

    
30.09.2016 / 18:08