How/where to configure v8 database credentials correctly?

I just did a fresh install of v8.2. Logging in only works in /legacy, not on top / level.

As far as I have read on the forum this is because the installer only saves the legacy database config, but not the v8 .env.local config.

I have tried to create a top level /.env.local file, and also put one in /public/.env.local, with the same content:

DATABASE_URL=“mssql://suite-user:******@localhost:3306/suitecrm”

It seems these are both ignored, since I am still getting PHP errors like

2022-12-28 16:00:15 176 [Warning] Aborted connection 176 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2022-12-28 16:00:15 177 [Warning] Access denied for user 'root'@'localhost'

So obviously my database url with the suite-user user is not picked up.

How can I get the v8 code to correctly pick up the database config???

You can change your database configuration in this file public/legacy/config.php , search for the array dbconfig

That is the legacy config.php, which as I write is properly set up by the install wizard.
(It works fine, I can log in under /legacy)

But the v8 login uses another configuration setup, which I cannot find exact documentation on and cannot get working…

Check the other .env files in the root directory of your installation (not under public, because database credentials are not public :wink: )

So I figured this out… I had copied and pasted the line to put into the .env file from another post in this forum. And when you type quotes like

DATABASE_URL=“mysql://…”

Into the editor, the quotes are converted to typographically correct quotes by the forum system.
They look similar but the .env line does not parse with those quotes…

In the Discourse (our Forum software) editor you can enclose your strings in back-ticks (`) to get them to render literally.

Without back-ticks: “quote”
With back-ticks: "quote"