Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

前端 未结 30 1265
南方客
南方客 2020-11-22 11:30

I am getting the following error when I try to connect to mysql:

Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)<

30条回答
  •  长情又很酷
    2020-11-22 11:54

    If your mysql was previously working and has stopped suddenly just "reboot" the server.

    Was facing this issue on my CentOS VPS.->

    Was constantly getting

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'(2)

    Tried all techniques, finally restarting the server fixed the issues ->

    shutdown -r now

    Hope this helps !!

提交回复
热议问题