Console doesn't work after installation

Hi folks!

I installed succesfully the shopware with the Mac OS installer. Latest version.

I can see my shop, frontend, backend, connect to database with phpMyAdmin, etc.

Problem is: When trying to use the console to update/create plugins I receive:

“WARNING! Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [1045] Access denied for user ‘******’@‘localhost’ (using password: YES) in /Users/truads/www/bitnami/apps/shopware/htdocs/engine/Shopware/Components/DependencyInjection/Bridge/Db.php”

“[Symfony\Component\DependencyInjection\Exception\RuntimeException]
  You have requested a synthetic service (“db_connection”). The DIC does not know how to construct this service.”

 

"Access denied for user ‚******‘@‚localhost‘ " - looks like there is a problem with your database credentials.

1 „Gefällt mir“

It is really strange, the application connects to the database, also I can connect to the database.

Only when trying to use the console I got this error. My config.php file has the correct credentials.

Does the console get the credentials from somewhere else?

We know very little about your environment … a typical problem is that console commands run in a different environment than the webserver, e.g. with regard to .ini-files or even php versions.

Good luck! (Or be more verbose about your environment and setup.)

Geert

1 „Gefällt mir“

Do you connect via socket or 127.0.0.1 to your database? Maybe try using 127.0.0.1 instead of “localhost”?

1 „Gefällt mir“

@hsoebbing schrieb:

Do you connect via socket or 127.0.0.1 to your database? Maybe try using 127.0.0.1 instead of „localhost“

Thanks! It worked.

Sorry for the beginner questions. First time trying.

Did you change this in the .env file?

Like doing DATABASE_URL=mysql://127.0.0.1:user@pw:3306/shopware6

instead of

DATABASE_URL=mysql://localhost:user@pw:3306/shopware6

Be cause doing this results in this Error for me:

Could not connect to database. Message from SQL Server: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ‚‚@‘‘ (using password: YES)

But Username and Password are correct.