This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Doctrine Database connection clarification

Discussion relating to version 1.3.x and 1.4.x

Doctrine Database connection clarification

by alexis » Wed Feb 06, 2013 12:27 pm


Trying to connect to a dababase which is in a different server:

php symfony configure:database "mysql:host=<IP>;dbname=<db_name>" <username> <password>

class: sfDoctrineDatabase
dsn: 'mysql:host=<IP>;dbname=<db_name>
username: <username>
password: <password>

Getting error

PDO Connection Error: 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
Junior Member
Posts: 8
Joined: Thu Nov 11, 2010 12:35 pm

Re: Doctrine Database connection clarification

by kindrosker » Tue Feb 19, 2013 9:03 am

you might have to use database port
for example
Code: Select all
dsn: 'mysql:host=<IP>;dbname=<db_name>;port=<db_port>'
User avatar
Posts: 59
Joined: Sat Jul 12, 2008 12:16 am
Location: Ukraine