Reputation: 5084
For my Symfony2 project, I'm using Propel with MySQL.
When I deployed it on a server and ran:
php app/console propel:database:create --env=prod
I got this error:
[Propel] Exception caught
Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'user'@'localhost' (using password: YES)]
Which is really weird because when I run MySQL CLI with exactly the same host, user and password it works fine.
$ mysql -h localhost -u user -p
Propel-bundle: 1.2.13
What's going on?
Upvotes: 0
Views: 630
Reputation: 2612
Try these steps
config/databases.yml
with the working username and password. Ensure you are using the correct password and port herepropel: class: sfPropelDatabase param: classname: PropelPDO dsn: 'mysql:dbname=your-database-name;host=localhost' port : 3306 username: user password : your-password encoding: utf8 persistent: true pooling: true
Upvotes: 1