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

后端 未结 30 1451
再見小時候
再見小時候 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-11-30 23:57

    I had the same problem after altering my.cnf. I resolved this problem next steps.

    First : to find the location of error.log, look at 'my.conf'.

    Second : I looked up error.log, I found next massages,

    "unknown variable 'default-......' " ..... " mysqld_safe Starting mysqld darmon with from /var/lib/mysql "

    Third : I reset my.conf to the default, then restart, this problem was resolved.

    I hope this helps.

提交回复
热议问题