I'm using Symfony 2.3 with Doctrine2, Xampp 1.8.2 with PHP 5.4.19 on a Windows7 machine. I got that connection error with "Could not create database for connection named 'symfony'"when I try to create a DB using the command.
$ php app/console doctrine:database:create
The settings should be ok. This is my parameters.yml file.
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_name: symfony
database_port: '3306'
database_user: root
database_password: xxx
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
My phpMyAdmin runs correctly and I can connect any DB by simple .php files but not from Doctrine. pdo_mysql is also enabled in my php.ini. The other posts says, that the Path of the mysql.sock was wrong or that the port didn't match. In my case the Port is correct and I use 127.0.0.1 instead localhost what also was mentioned as wrong in some cases.
Hope someone can help, Pete