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

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

    A quick workaround that worked for me: try using the local ip address (127.0.0.1) instead of 'localhost' in mysql_connect(). This "forces" php to connect through TCP/IP instead of a unix socket.

提交回复
热议问题