Reputation: 6725
I am trying to use Symfony 3.0 With a PostreSQL Database.
Parameters.yml:
parameters:
database_driver: pdo_pgsql
database_host: 127.0.0.1
database_port: 5432
database_name: dmfa
database_user: username
database_password: password
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: a28a9e1bfefb5aa6f7f3be73a9a62c01eedf55ab
I run the following code to try and generate and entity:
php ./bin/console doctrine:generate:entity
Despite changing my drive to pdo_pgsql i get the following errors:
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: SQLSTATE[HY000] [2006] MySQL server has gone away
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2006] MySQL server has gone away
[PDOException]
SQLSTATE[HY000] [2006] MySQL server has gone away
[PDOException]
PDO::__construct(): MySQL server has gone away
It feels like i am missing a step because Symfony is still looking for a mysql database. Please give me some insight on how to correct this error.
Upvotes: 0
Views: 2502
Reputation: 17032
Double check that in your app/config/config.yml
you have:
doctrine:
dbal:
driver: "%database_driver%"
Upvotes: 5