Cannot connect to mysql with 127.0.0.1

前端 未结 5 1233
逝去的感伤
逝去的感伤 2020-12-31 11:50

With the following code I can connect to mysql: mysql_connect(\"localhost\",\"username\",\"\");

But if I change localhost to 127.0.0.

5条回答
  •  暖寄归人
    2020-12-31 12:13

    Do you have more than 1 mysql servers installed/running on your system? If so, please specify the port number of the mysql server you are trying to access like 127.0.0.1:3306,127.0.0.1:8889 etc.

    If you do not know whether there are any other mysql server instances running on your system also, please specify the port.

提交回复
热议问题