I installed Drupal Console Launcher as described in the documentation :
curl https://drupalconsole.com/installer -L -o drupal.phar
mv drupal.phar /usr/local/bin/drupal
chmod +x /usr/local/bin/drupal
It works fine and the 'drupal' command works.
After I installed the console in the site folder :
composer.phar require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader
When I run the 'drupal list' command in the site folder I have a message : SQLSTATE[HY000] [2002] No such file or directory
So I edited the 'host' in the 'settings.php' file replacing 'localhost' for '127.0.0.1'
In this case, I have a SQLSTATE [HY000] [2002] Connection refused error and the site no longer works!
I also tried installing drupal 8 with Composer to have the console. There I have an error SQLSTATE [HY000] [2002] Connection refused
It's been almost a week now that I try in all directions without success!
I'm on OSX with a MAMP server.
Would anyone have an idea ?