Almost there... Node ... database connection on Digital Ocean pointing to 127.0.0.1:3306?

Almost there… Node … database connection on Digital Ocean pointing to 127.0.0.1:3306 ??

I have done the setup with DO… i have setup the REMOTE targets and tested the connections and can even access the database via MySQL workbench… I have tested the “remote” targets and deployed all with green lights :slight_smile: :slight_smile: … but why would it still be looking for 127.0.0.1:3306 ??

With my target set to digital ocean… i test test connection

Direct connection to the DO database via the IP

Test the connection all seems good.
3

I can “query” the database in Wappler and all working…

All is good to go? and the lights are green and deployed…
5

So it should then all be OK? So why am i getting this? Im sure its a small setting that im missing?
Because once deployed… it seems its looking for a localhost port 127.0.0.1: 3306?

There are two places you need to change the DB credentials/options: One is the database manager which you’ve done it, the other place is the connection “db”, inside Globals on the server workflow tab I think

One place affects Wappler GUI, the other place affects the NodeJS app

oohhh ok… let me see…

Thanks @Apple for the response on a saturday…
So if i go to the database manager on the “Docker”

It refers me to…
10

that is the setup on the docker

Then you said i must go to GLOBALS
db connection
and check the properties

And then this is what comes up

That is using port 3306 ?? should that then change?

But why would i need to change that in the GOBALS? because if i set a remove target does it not create a connection setup for that “target” and use the settings of the “target” ?

Oh, thanks for the screenshots. I’ve not used Docker Machine deployment before, so I think it’s better to wait for someone else to answer. Supposedly, it would connect to hostname “db” instead of 127.0.0.1 according to your screenshots

thanks that is what I thought would happen… but thanks for your time @Apple have a great Saturday… we have load shedding now… * electricity cuts for 2 hours… will check in later… thank you

1 Like

If you are using docker and a docker database - all settings are done automatically for you. You don’t need to mess with any.

Thanks for the response @George… much apricated…

My database… its on WAMP as im using if from a PHP project to convert to the Node project.

So i setup the database as localhost with a direct connection.

But im sure i read somewhere that i need to create a NEW connection

But i cannot create one…

What would be the solution? Not to use a direct connection to localhost database?
Recreate the connections?

On my localhost its all working… Using the Wappler Local Server…

Then I followed the steps to upload to docker… all green lights… and accessing database via Wappler database tool…

So what would be the easiest way to resolve this…? Create a NEW project …

Just make sure you local database connection is called “db” and set it up as you wish.

1 Like

ahhhh OK! so that is the missing link :slight_smile: it should not have a custom name… :slight_smile: let me have a go.

Thanks George you are a super star!!!

OK guys! Update!!!

++++++++++++ IMPORTANT ++++++++++++++++++++++++

If you are going to use a localhost database (WAMP setup) and the Wappler Local Server … with Docker and DO…
Then please don’t give your database connection a “custom” name… call it… just “db”

It will save you tons of headaches… and crying… hahahaha :slight_smile: thanks @George for the relative easy fix… just had to search and replace all the files for my custom connection name… and in all the target config folder removed it… or rename where applicable :slight_smile: :wink: :slight_smile:

2 Likes