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
I had the same error when attempting to build my tables in Symfony and using MAMP. I fixed the issue by changing my dsn line, in the databases.yml file, to the following:
dsn: 'mysql:host=localhost;dbname=jobeet;unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock'