|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-07-29 18:19 UTC] dan at yes dot lt
Description:
------------
Fatal error: Uncaught exception 'PDOException' with message '[2017] Can't open named pipe to host: . pipe: MySQL (2)' in ...
Reproduce code:
---------------
$db = new PDO('mysql:dbname=test;host=localhost', 'user', 'password');
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 07:00:01 2025 UTC |
pdo_mysql try to connect to mysql with unix socket if you enter "localhost" as hostname. Use ip address (127.0.0.1) instead of hostname (localhost) : $db = new PDO('mysql:dbname=test;host=127.0.0.1', 'user', 'password'); It worked for me on XP.