Getting an PDO error when trying to do php symfony doctrine:insert-sql The error I get:
php symfony doctrine:insert-sql
Warning: PDO::__construct(): [2002] Connection refused
MAMP PRO 2.x I was able to solve this and many similar issues by simply unchecking "Allow local access only" in the MySQL prefs on the MAMP control panel.
MAMP PRO 3.x As stated by Kendrick: