My command line skills are limited but I’m trying to be better. I’ve been using
composer successfully for a while to initiate Craft installs, but then subsequently using the Craft web GUI to install plugins.
Today I thought I’d try and use the command line on a fresh local install, which has DB connection details stored in
.env as is usual. The host is configured through MAMP Pro on Mac OS Mojave.
composer update on my install and it reported there was nothing to update.
I then used the web GUI to install
craftcms/contact-form and all went fine, so there is no doubt that my local DB credentials are correct.
Then, in the command line I invoked:
composer require craftcms/contact-form-honeypot
…which ran fine. And then:
./craft install/plugin contact-form-honeypot
"failed to install contact-form-honeypot: Craft CMS can’t connect to the database with the credentials in config/db.php."
What am I doing wrong?