The MySQL client cannot wait for or open the named pipe on the specified Windows host, so the connection fails.
MySQL Error 2016: CR_NAMEDPIPEWAIT_ERROR appears when a Windows client cannot open or wait on the named pipe defined for a local or remote MySQL server. Enable TCP, verify --pipe and --socket settings, or restart the pipe service to restore connectivity.
Can't wait for named pipe to host: %s pipe: %s (%lu)
Error 2016 is a client-side MySQL connection error raised only on Windows. The message “Can't wait for named pipe to host: <host> pipe: <pipe_name>” means the client attempted to connect through a Windows named pipe but the pipe could not be opened within the timeout period.
The failure stops the session before authentication, so no SQL runs.
Fixing it quickly matters for availability and for any applications compiled with --enable-named-pipe that default to pipe mode when localhost is used.
Named-pipe networking must be enabled on both client and server. If mysqld was started without --enable-named-pipe the pipe handle never exists, triggering error 2016 the moment the client waits for it.
Windows limits simultaneous pipe instances.
Heavy traffic or zombie handles can exhaust slots and prevent new connections from opening the pipe in time.
The pipe name or host may be misspelled.
The default is \\.pipe\mysql, but clients often specify an incorrect custom name with --socket.
Antivirus or endpoint security tools sometimes block pipe creation or delay it beyond MySQL’s default 30-second wait.
Start by confirming that mysqld was launched with named-pipe support:
mysqld --enable-named-pipe --shared-memory
Then ensure the client explicitly requests pipe mode:
mysql --protocol=PIPE --socket=mysql
If the server is already running, restart it with --enable-named-pipe or add the option permanently in my.ini
:
[mysqld]
enable-named-pipe
Free frozen pipe handles by restarting the MySQL service or the Windows Named Pipe service:
net stop mysql
net start mysql
If network fallback is acceptable, disable pipe use on the client so TCP is chosen instead:
mysql --protocol=TCP -h 127.0.0.1 -P 3306
Galaxy users can store both connection strings inside the Connection Manager and switch protocols instantly without rewriting SQL.
Local development on WAMP/LAMP stacks. Enable both TCP and pipe so GUI tools can choose either protocol.
Restart after editing my.ini.
High-load production server. Increase --named-pipe-timeout
(MySQL 8.0+), and monitor pipe handle counts with Process Explorer
.
CI pipelines running MySQL in Docker for Windows. Use TCP because pipe mounts are not supported between host and container.
Always enable TCP and pipe together.
Clients can then fall back automatically.
Set --named-pipe-timeout
to a higher value if you expect bursts.
Automate service restarts during deployment to release orphaned handles.
With Galaxy, store multiple connection profiles and rely on its health checks to pre-warn when the pipe is unreachable.
Error 2013: CR_SERVER_LOST. Happens after the session starts but the server later disconnects.
Check keepalive and network latency.
Error 2002: CR_CONNECTION_ERROR. Generic connection failure often seen when TCP port 3306 is blocked.
Error 2027: CR_READ_ERROR. Read timeout after connection; may surface if pipe latency spikes.
.
If mysqld lacks pipe support, the handle never exists and every pipe client fails immediately.
Custom pipe names in my.ini must be matched exactly by the client’s --socket option.
Windows limits concurrent instances; heavy traffic or leaked handles make new waits time out.
Endpoint protection can sandbox or delay pipe creation beyond the default 30-second limit.
Using 127.0.0.1 forces TCP; use localhost or a dot (.) to attempt pipe mode.
.
No. Named pipes for MySQL are Windows-specific, so the error never appears on Linux or macOS.
Yes. Remove --enable-named-pipe from my.ini and restart mysqld; clients must then use TCP or UNIX sockets.
MySQL 8.0.14+ adds --named-pipe-timeout. Earlier versions require adjusting client retry logic or avoiding pipes.
Galaxy lets you save both pipe and TCP profiles, switch with one click, and alerts you when the active protocol fails.