Database connection clarification

Every time I start configuring a new site which (not by my will) uses a MySql database for which it is not possible for me to use Database Direct Manager (the provider does not allow direct connections, I encounter difficulties
I would like to understand once and for all if and how it is possible to configure a local database for development and a remote database for production.
In this case it seems to me that I have configured correctly, but unfortunately it does not work
1- This is the initial project:

2- target production configuration TEST OK


3- target development configuration. TEST OK


4- Connection with target set to Production (db remote) is OK

5- Connection with target set to Development (db local) *ERROR


Of course my goal is to be able to use the local database for development and the remote database for production.
Then maybe being able to eventually update the structural settings of the local database following changes in the remote database

Obviously I’m doing something wrong, but I don’t understand where
Anyone know how?
Thank you

I normally take no notice of the database when configuring the project settings. I ususally leave it untouched.

In the Database Manager Panel, I specify the database connections for each of the targets.

Hopefully that helps.

1 Like

Thanks Ben
In the project phase I can not configure any database for the remote target Production
In fact, the remote database is read without problems, even if in this case it is not possible to activate Direct Connection
The problem is being able to manage a local identical database for development
What I have tried to do is configure in the local development target of the project, a Docker database.
But unfortunately it doesn’t work and it gives me an error
Note that activating the Develop target strangely keeps me a red dot. Maybe for the database error?