Management of multiple database connections (local and remote)

We use a local database for testing, and a different connection when we deploy to the production server. It seems that Wappler is designed to manage this in that depending on what Target I select, I can configure different connection information if I click on the Connection Options button in the Database Connection.

However, when we deploy to the production site, we often (or maybe always!) seem to end up with the local connection options being written to the production server which obviously breaks the site.

I’m not sure if this is a bug (it seems like it) or if we’re doing something wrong, but I can’t see any options we are missing here.

2 Likes

Yes, it is a bug since about 3.0.0 rc2.

See this thread about it…

You need to copy the file the thread talks about from the .wappler folder to the dmxConnect folder.

Can’t seem to copy the link on my phone - thread is called

Connection_name.db File Not Being Copied To dmxConnect/modules/Connections

1 Like

I have experienced this bug since the first time it was released.

My solution is that when I change target, i go to any server action, open the database connection, and click save.
Then click save on server action to save linking.
Then save the server action too.

Later, when I have to change the target again, I repeat the above steps.

Wappler correctly shows the connection settings as per the current target, but it does not change the config files. So saving them manually works.

1 Like

Can you share the link to the thread please?

Thanks @Antony

It’s a little worrying that such a major bug was allowed through release 3.0 - I’d consider it major given it kills my production site each time we deploy.

I guess it’s this one -:

1 Like

Yes, that is the one…

This is fixed in Wappler 3.0.2

3 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.