I can not enter mysql in debian

0

When installing MySql-Workbrench, it has unconfigured MySQL and phpMyAdmin, stopping working. I have tried to install it again and it gives me the following error:

  

ERROR 2002 (HY000): Can not connect to local MySQL server through socket   '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

    
asked by Claudio Gonzalez 14.06.2017 в 18:39
source

1 answer

1

Check the file my.cnf , (Normally it is in /etc/mysql/ ) and check that the socket is well defined;

Also check that the bind address in this file is localhost.

bind-address=localhost #Si tan sólo te conectarás al servidor desde local.
bind-address=0.0.0.0 #Para permitir conexiones desde cualquier dirección.

You can check if the mysqld service is active with this command

systemctl status mysqld.service

(Assuming your distribution is based on systemd)

In case the service is not active, you can start it with this command:

sudo systemctl start mysqld.service
    
answered by 14.06.2017 в 19:44