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

后端 未结 30 1859
再見小時候
再見小時候 2020-11-30 23:15

I\'m getting this error

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

even though

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 00:04

    On Debian this was a bind problem for me so changing bind-address from localhost to 0.0.0.0 helped.

    vim /etc/mysql/my.cnf 
    

    bind-address = 0.0.0.0

提交回复
热议问题