note 94927 added to function.mysql-connect
| From: | sholland at napervillegi dot com | Date: | Thu, 03 Dec 2009 05:18:41 +0000 |
| Subject: | note 94927 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163516@lists.php.net to get a copy of this message | ||
If you are getting an error "Can't assign requested address" you may have a problem
with the mysql port. I had just moved my server to Mac OS X 10.6 and mysql_connect was giving this
error. Going into the /etc/php.ini file and setting the default port number to 3306 fixed the
problem.
mysql.default_port = 3306
The php.ini file suggests that PHP will select the port by using the $MYSQL_TCP_PORT or the
mysql-tcp entry in /etc/services, but in this case it is not so. /etc/services on my machine has
3306 listed, but it didn't get picked up.
This is sort of a bug report, in that the documented feature isn't working. Please don't
delete this until the community decides how to address the problem. This is one of those hair
pulling exercises to get fixed.
----
Server IP: 69.147.83.197
Probable Submitter: 76.213.88.125
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- https://master.php.net/note/edit/94927
Del: integrated -- https://master.php.net/note/delete/94927/integrated
Del: useless -- https://master.php.net/note/delete/94927/useless
Del: bad code -- https://master.php.net/note/delete/94927/bad+code
Del: spam -- https://master.php.net/note/delete/94927/spam
Del: non-english -- https://master.php.net/note/delete/94927/non-english
Del: in docs -- https://master.php.net/note/delete/94927/in+docs
Del: other reasons-- https://master.php.net/note/delete/94927
Reject -- https://master.php.net/note/reject/94927
Search -- https://master.php.net/manage/user-notes.php