当我通过mysql drive
mysqli_connect('localhost:9306')
- 成功返回资源id #21
但是当我使用'MySQLi' driver
时,它会返回以下错误消息:
Unknown MySQL server host 'localhost:9306' (3) and Mysqli Error No as 2005
答案 0 :(得分:0)
您的主机名是localhot而不是localhostt
因为它显示错误:
Unknown MySQL server host localhostt:9306
^^^^ here
应该是localhost
。检查您的代码并将其更改为localhost
,而不是localhostt
。