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

后端 未结 30 2892
再見小時候
再見小時候 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:41

    Another workaround is to edit /etc/my.cnf and include host in the section [client]

     [client]
     #password       = your_password
     host            = 127.0.0.1
     port            = 3306
     socket          = /var/run/mysql/mysql.sock
    

    And then restarting the mysql service.

    This workaround was tested in: Server version: 5.5.25a-log Source distribution

提交回复
热议问题