Node.js and DB connection

Marzio, when setting up your direct connection you can not use localhost!
For the direct connection use the remote access host/port provided by your hosting!

The direct connection connects to your Database directly, not through the target so you can’t just put localhost there. Use the same credentials / host / port as you would do in navicat / mysql workbench or any other software used to access your db remotely.

To be able to connect from Wappler with direct db connection to an external database in plesk, you need to allow remote connections, maybe this will help:

1 Like

The problem is just that
Shared hosting hardly allow direct access; in fact Navicat I can use it only on some domains that are on Server that allow direct access
So what I would like to do is to be able to connect the database with traditional (non-direct) access
There is a checkbox option to not use direct access, but it doesn’t work

Without direct db access Wappler can’t read your database schema with NodeJS, so it is required

I am a little disappointed
So the use of node.js with Wappler is possible only on dedicated hosting, because shared Hostings hardly allow direct access to the database.
I don’t understand why deactivating direct access is available if the direct connection is necessary

It probably depends on your host. I haven’t used NodeJS yet, but I do use shared hosting (reseller account), using cPanel and manage databases with Navicat.

Remote MySQL access can be enabled from cPanel - eg using an IP address. Alternatively, Navicat also has various options for remote access, including using SSH or HTTP tunnel.

1 Like

I have used Navicat for years, but then some Providers for self-styled security reasons have disabled the possibility of direct access to the Database
Unfortunately, the choice of provider does not always depend on my choice
I asked support if there is a possibility to enable a single domain. But in case of refusal I will have to abandon the choice of using node.Js for some domains, hoping that with the new version of Wappler direct connection is not necessary also for traditional domains

Hi George
as expected the Hosting Assistance confirmed to me that with shared Server they do not allow direct access to the MySql database
So in order to continue with NodeJS I have only a few alternatives:
Either Wappler allows me to connect a database in a traditional non-direct way (if possible) or I should find, I don’t know where, an external database server that allows direct access (but this implies unexpected costs)
Another possibility is to change Hosting, but this at the moment I prefer to avoid it
Ultimately not to use NodeJS

2 Likes