Bug #6620 Documentation on configuring client for named pipe is wrong/incomplete
Submitted: 15 Nov 2004 6:30 Modified: 2 Jan 2005 19:45
Reporter: Tom Metro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1.7 OS:Windows (Windows NT)
Assigned to: CPU Architecture:Any

[15 Nov 2004 6:30] Tom Metro
Description:
The documentation supplied with 4.1.7 says:

> *`Can't open named pipe' error*
>      If you use a MySQL 3.22 server on Windows NT with the newest MySQL
>      client programs, you will get the following error:
> 
>           error 2017: can't open named pipe to host: . pipe...
> 
>      This happens because the release version of MySQL uses named pipes
>      on NT by default.  You can avoid this error by using the
>      `--host=localhost' option to the new MySQL clients or by creating
>      an option file `C:\my.cnf' that contains the following information:
> 
>           [client]
>           host = localhost

How to repeat:
While I know that setting "host=localhost" behaves magically on UNIX where a UNIX domain socket will automatically get used, on Windows, when using only named pipes and the above config in my.ini, I get:

% mysql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

Suggested fix:
If instead I use:

[client]
socket = mysqld
protocol = pipe

It works as expected. (Both parameters are necessary. Obviously the socket value changes to reflect what the server was set to use. The "protocol" parameter seems like something the client library could figure out, given the context (that its Windows and that a socket name was specified).)

I recommend updating the documentation to reflect this (unless "host=localhost" is supposed to work and this is a bug in the code). Even still, the above quoted documentation seems incomplete, as I assume you'd have to at least specify the name of the named pipe (as I have done above, and, if I recall correctly, would be required on UNIX), unless there is some compiled-in default.

I also recommend showing a named pipe example configuration (both client and server) example in the manual, given that named pipes are the recommended, more secure communication method.
[2 Jan 2005 19:45] MySQL Verification Team
I verified that text in 4.1.7 manual, however it was already modified in the
Manual shipped with 4.1.8. BTW the named pipes aren't enabled by default
on Windows-NT servers, now is necessary to use the server start option
--enable-named-pipe.

Thank you for the bug report.