Doc #61570 [Opn]: mysqlnd cannot connect to MySQL when only named pipe is enabled

From: Date: Thu, 14 Jun 2012 12:12:58 +0000
Subject: Doc #61570 [Opn]: mysqlnd cannot connect to MySQL when only named pipe is enabled
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8469@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61570&edit=1 ID: 61570 Updated by: uw@php.net Reported by: peaceable_whale at hotmail dot com Summary: mysqlnd cannot connect to MySQL when only named pipe is enabled Status: Open Type: Documentation Problem Package: mysql Operating System: Windows Server 2008 R2 PHP Version: 5.4.1 Block user comment: N Private report: N New Comment: Thanks for following up and changing to doc problem. Great hint on open basedir... mysqlnd is using PHP Streams and PHP Stream will follow PHP rules. Previous Comments: ------------------------------------------------------------------------ [2012-05-04 10:18:29] peaceable_whale at hotmail dot com Finally, I found that the connection problem is caused by the use of open_basedir. It appears that named pipe cannot be used with open_basedir. I have changed the type of this report to be documentation problem. I think the documentation should mention that: - "." should be used instead of "localhost" for named pipe connection - Named pipe will fail when open_basedir is in effect ------------------------------------------------------------------------ [2012-05-04 08:49:14] peaceable_whale at hotmail dot com Yes, I am able to connect using the following command: mysql -W -u root -p ------------------------------------------------------------------------ [2012-05-04 08:45:53] uw@php.net Can you connect to MySQL using named pipe and the mysql prompt (http://dev.mysql.com/doc/refman/5.5/en/connecting.html)? ------------------------------------------------------------------------ [2012-05-03 08:33:50] peaceable_whale at hotmail dot com Changed affected PHP version to 5.4.1. ------------------------------------------------------------------------ [2012-04-26 03:33:15] peaceable_whale at hotmail dot com When using "." as the hostname, the following warning is returned: Warning: mysqli::mysqli(): (HY000/2002): Unknown errror while connecting When using "\\\\.\\pipe\\MySQL". as the hostname, the following error is returned: php_network_getaddresses: getaddrinfo failed: No such host is known. Regarding documentation, if "." is required for named pipe connection, the PHP documentation, not the MySQL documentation, should explicitly state so. Currently, it only states "Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.", I expected that passing "localhost" will cause pipes to be used when possible, and did not expect "." is supported as it is not a valid hostname or IP address. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61570 -- Edit this bug report at https://bugs.php.net/bug.php?id=61570&edit=1

« previous php.doc.bugs (#8469) next »