note 93508 added to mysqli.connect
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 14 Sep 2009 00:37:12 +0000 |
| Subject: | note 93508 added to mysqli.connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160522@lists.php.net to get a copy of this message | ||
If you get an error like
Can't connect to MySQL server on 'localhost' (10061)
and you use named pipes/socket connections (or aren't sure how you installed the MySQL server)
try the following connect command:
mysqli_connect('.', $user_name, $password, $database_name, null, 'mysql');
The '.' as hostname is absolutely necessary when using named pipes. 'localhost'
won't work. 'mysql' is the standard name for the pipe/socket.
----
Server IP: 209.41.74.194
Probable Submitter: 62.235.188.35
----
Manual Page -- http://www.php.net/manual/en/mysqli.connect.php
Edit -- https://master.php.net/note/edit/93508
Del: integrated -- https://master.php.net/note/delete/93508/integrated
Del: useless -- https://master.php.net/note/delete/93508/useless
Del: bad code -- https://master.php.net/note/delete/93508/bad+code
Del: spam -- https://master.php.net/note/delete/93508/spam
Del: non-english -- https://master.php.net/note/delete/93508/non-english
Del: in docs -- https://master.php.net/note/delete/93508/in+docs
Del: other reasons-- https://master.php.net/note/delete/93508
Reject -- https://master.php.net/note/reject/93508
Search -- https://master.php.net/manage/user-notes.php