Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as in your PHP configuration and leave the server field blank.作者: 喝雪碧的虾 时间: 2012-4-22 16:52
hosts里面要解析一下吧。PHP5.3有很多问题的,建议别用作者: zc035 时间: 2012-4-22 16:55
本人表示,我使用 php 5.3.10 , mysql 使用 localhost 连接一切正常。