Doctrine Database connection clarification

Discussion relating to version 1.3.x and 1.4.x

Doctrine Database connection clarification

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

Hi,

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

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

all:
doctrine:
class: sfDoctrineDatabase
param:
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
alexis
Junior Member
 
Posts: 8
Joined: Thu Nov 11, 2010 12:35 pm

Re: Doctrine Database connection clarification

Postby 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
kindrosker
Member
 
Posts: 59
Joined: Sat Jul 12, 2008 12:16 am
Location: Ukraine


Return to symfony 1.3 and 1.4

Who is online

Users browsing this forum: No registered users and 1 guest