Using MySQL with PHP on Server 10.6
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 a MacMini running 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.