I am trying to connect to AWS RDS to my AWS EC2 application that is a zend framwork app using doctrine module to connect to mysql. I can successfuly connent to my AWS RDS database from mysql Workbench. Any help will be greatly appreciated. Her are some of stack traces:
PDOException
/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
SQLSTATE[HY000] [2002] Connection timed out
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(40): PDO->__construct('mysql:host=doct...', 'user', 'password', Array)
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(41): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=doct...', 'user', 'password', Array)
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(356): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'user', 'password', Array)
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(680): Doctrine\DBAL\Connection->connect()
vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT COUNT(*)...', Array, Array, NULL)
vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(286): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(794): Doctrine\ORM\Query->_doExecute()
vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(598): Doctrine\ORM\AbstractQuery->execute(NULL, 3)