I keep encountering issues when running Craft’s
setup command locally. Note that I use MAMP Pro for this sort of thing. I entered all the database creds correctly, and then got a
SQLSTATE[HY000]  No such file or directory error. This StackExchange answer sorted it for me. Add
'unixSocket' => getenv('DB_SOCKET') to
Still encountering database connection issues on staging for one site currently under development. All of the credentials are set correctly in
/config/db.php retrieves the wrong
DB_USER value. Ended up explicitly adding the problematic value to the
/config/db.php file as a quick workaround, but it’s not ideal.