diff --git a/reference/mysql/functions/mysql-connect.xml b/reference/mysql/functions/mysql-connect.xml index c9bb0e5b37..aa1d499d63 100644 --- a/reference/mysql/functions/mysql-connect.xml +++ b/reference/mysql/functions/mysql-connect.xml @@ -1,5 +1,5 @@ - + @@ -39,9 +39,19 @@ The server parameter can also include a port - number. eg. "hostname:port" or a path to a socket + number. eg. "hostname:port" or a path to a local socket eg. ":/path/to/socket" for the localhost. + + 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 + mysql.default_host in your PHP configuration and leave the server field + blank. + Support for ":port" was added in PHP 3.0B4.