0

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.

1
  • 1
    The DB server is not running or has no network connection. Commented Nov 12, 2013 at 15:38

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you!, it was a Firewall problem from the server :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.