note 91965 added to function.mysql-connect

From: Date: Thu, 02 Jul 2009 23:38:53 +0000
Subject: note 91965 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-157855@lists.php.net to get a copy of this message
Hopefully this saves someone some grief. My dev computer is windows and runs wampserver. I have frequent problems with PHP being unable to connect to MySQL after periods of extreme DB activity. Long story short, it was because I was not running mysql via named-pipes and Windows was running out of available ports to serve PHP. Apparently, on windows, you have 5000 ports to work with and once they are opened, they remain so for 120 seconds before being released. This causes problems with mysql/networking because a new port is requested for each connection. You can read more about the problem at: (Link too long and had to be broken up) http://dev.mysql.com/doc/refman/5.0/en /can-not-connect-to-server.html#can-not-connect-to-server-on-windows ?> Since mysql is on localhost, I can just enable named-pipes (which is how you should have mysql setup if you don't need networking) to get around the problem instead of the workaround listed on that page. For details, see: http://dev.mysql.com/tech-resources /articles/securing_mysql_windows.html ---- Server IP: 208.69.120.35 Probable Submitter: 76.20.145.120 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- https://master.php.net/note/edit/91965 Del: integrated -- https://master.php.net/note/delete/91965/integrated Del: useless -- https://master.php.net/note/delete/91965/useless Del: bad code -- https://master.php.net/note/delete/91965/bad+code Del: spam -- https://master.php.net/note/delete/91965/spam Del: non-english -- https://master.php.net/note/delete/91965/non-english Del: in docs -- https://master.php.net/note/delete/91965/in+docs Del: other reasons-- https://master.php.net/note/delete/91965 Reject -- https://master.php.net/note/reject/91965 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#157855) next »