Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Today trying to run my project coded under Zend Framework, and connected to a remote database, i got those 2 errors:

PDOException: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\trunk\library\Zend\Db\Adapter\Pdo\Abstract.php on line 129

Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\trunk\library\Zend\Db\Adapter\Pdo\Abstract.php on line 144

Before it was working normally, and i don't know what going on with it today. It seems it's a connection problem to the database but the question, where the problem come from, from the database server, or my project and where excatly. It's the first time, i got this error, and i really don't know what that mean.

share|improve this question
1  
The DB server is not running or has no network connection. –  vascowhite 18 hours ago

1 Answer

It sounds like a network problem to me, try a telnet from the app server:

telnet <remote db name/IP> 3306

If that fails, you have a network/firewall problem. Or the DB is is not listening on that port or on the network entirely. Do a netstat on the remote DB to confirm: Linux

netstat -an | grep LISTENING

Or windows

netstat -an | find "LISTENING"

You should see :3306 if it's listening on the default port.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.