Reputation: 3251
I'm deploying a new php project on a Windows based host and the big problem is, that mysql_connect takes literally ~1 second to connect to the mysql server on localhost each time. What the heck could be the problem?
PHPINFO says:
Client API version mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
No matter, what I try - PDO, mysqli or plain old mysql_connect - the connect time remains the same. What I noticed tho, that every mysql plugin (PDO, mysqli, mysql_connect) shows the same mysqlnd revision. Shall I ask the admin to nuke mysqlnd or this can be tuned somehow?
Upvotes: 0
Views: 425
Reputation: 11704
It could be taking a while to resolve localhost
- try connecting to 127.0.0.1 instead.
Upvotes: 2