Cannot connect to mysql with 127.0.0.1

前端 未结 5 1243
逝去的感伤
逝去的感伤 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:28

    You will be able to access it when you add the privileges for 'root'@'127.0.0.1' in the "USER_PRIVILEGES" table in the "information_schema" database

提交回复
热议问题