PHP MySql unknown server host

梦想的初衷 提交于 2019-12-07 01:54:27

I had a similar issue when I started out using mysqli. If you need to include the port, it has its own place in mysqli_connect.

$link = mysqli_connect("127.0.0.1", "username", "password", "dbname", 3306);

should work better for you. But I believe 3306 is the default port, so you may be able to just leave it off.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!