alg*_*der 4 php mysql tcp
你如何在myql_connect()中指定protocol = TCP?
dec*_*eze 11
通过阅读手册:
每当你指定"localhost"或"本地主机:端口"为服务器,MySQL客户端库将覆盖这一点,并尝试连接到本地套接字(在Windows命名管道).如果要使用TCP/IP,请使用"127.0.0.1"而不是"localhost". http://www.php.net/manual/en/function.mysql-connect.php
每当你指定"localhost"或"本地主机:端口"为服务器,MySQL客户端库将覆盖这一点,并尝试连接到本地套接字(在Windows命名管道).如果要使用TCP/IP,请使用"127.0.0.1"而不是"localhost".
http://www.php.net/manual/en/function.mysql-connect.php
归档时间:
14 年,11 月 前
查看次数:
4642 次
最近记录: