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

后端 未结 30 2313
再見小時候
再見小時候 2020-11-22 04:23

I am having a big problem trying to connect to mysql. When I run:

/usr/local/mysql/bin/mysql start

I have the following error :

<         


        
30条回答
  •  醉话见心
    2020-11-22 04:50

    If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with

    socket=/var/lib/mysql/mysql.sock
    

    you can check if mysql is running with the following command:

    mysqladmin -u root -p status
    

    try changing your permission to mysql folder. If you are working locally, you can try:

    sudo chmod -R 755 /var/lib/mysql/
    

    that solved it for me

提交回复
热议问题