I get an error like database operations using Symfony2.
SQLSTATE[HY000] [2002] Connection refused
parameters.yml
parameters
On Mac OSX using Mamp Pro, what solved the problem for me was going to the MySQL tab on the UI and checking the option Allow network access to MySQL
Don't forget to click Save to update the settings