Database Ubuntu with Resource Manager

With MacOS and Wappler 6.0 I set up a project on VPS Cloud server (Custom)
With Resource Manager / Server / Open SSH Terminal I created in Ubuntu a database MySQL
Maybe I should have created it directly from Resource Manager?
Here I stop because I don’t know how to connect the database with Resource Manager
Is there a tutorial?

@George @Teodor
I had no answers to my question because maybe I didn’t explain my problem well.
In other words, with Wappler, I often had difficulty configuring a MySQL database and in it accepted by Wappler.
Now, however, after the changes due to the updates of the various versions of Wappler, I am quite confused on what the correct procedure for the management of MySQL databases (local and remote) is the management procedure
In this latest project I used a VSP Cloud server with Ubuntu 22.04. The connection with Resource Manager is correct and functional, and also the Portainer and Traefik services are now correct.
In Ubuntu I created, like other times, a MySQL database and I would like to connect it to Wappler without errors or problems.
What I would like to know is what is the correct procedure to correctly connect a database created with Ubuntu:

  • With Server Action?
  • With database manager (Direct Manager)?
  • With Resource Manager?

Marzio,

once you did it, you must create a database connection in the Globals under the API

Screenshot 2023-12-01 alle 13.59.30

With previous versions of Wappler and with other providers, the databases have always been connected, albeit sometimes with some small difficulties.
Now in this project with Wapper 6 and another cloud server, I find an Etimedout connection problem
The “test” and “vadb” databases were created on Ubuntu 22.04 (as previously)




I then inserted the “test” database in the target development and in the target production the “vadb” database


I then configured the two databases in Global


After this if I call the databases on database manager and/or resource manager, ETIMEDOUT error appears
I don’t find the cause
I tried various solutions but without result

@Teodor @George

With the current version of Wappler, as regards the use of databases, I have a bit confused ideas
In a Nodejs project on Cloud Server (Custom) I created two databases in Ubuntu fully functional with Navicat:

  • “tests” for local use
  • “vadb” for remote use
  • In Global / Database Connection I configured the two databases

Then I configured the two databases on database manager and passed the tests

In the target settings (local and remote) I have not configured any databases (Test OK)

At this point I don’t understand how Resource Manager must be set
First of all, it is to be understood whether Resource Manager can be used with a custom (imported) server, because I noticed that in this case the creation of the databases cannot be used
If I understood well Resource Manager should manage the use of the “test” database locally and “VADB” remotely, I know what to do

Not sure why you are doing so many manuals steps to setup a database with the resource manager, just follow the docs for own databases:

Or when using managed database:

1 Like

Thanks George, but I don’t understand
First question
Do I have to eliminate the two databases (tests and Vadb) created on Ubuntu and the related connections in Global and on database manager?
SECOND QUESTION
If I follow the tutorial to get a single database server, unfortunately it gives me error. Maybe I have to eliminate something?
THIRD QUESTION
If I follow the tutorial to manage the database I cannot proceed because in this case I do not use digital ocean, but an imported custom server and does not allow me to create databases (there is not even the item in the drop -down menu

So how many databases do you want and where do you want them or have them? Is it all for one project?

The project is on Cloud Server (custom) in nodeJS / Docker, but at the moment the local and remote targets pass the tests, but do not have databases configured
What I need for the current project is to have two databases, one for development use (local) and the other for production use (remote)
And that’s what I did by creating the two databases (test and vadb) with Global.
If I carry out the tests with Database Manager the two databases are ok
At this point I would like the project to use the “test” database when I am in the local target and when I am in the remote target it uses the “vadb” database
The two databases were created in Ubuntu and also work with Navicat, therefore they accept remote connection.
At this point I don’t know how to use Resource Manager, also because since the server is not on Digital Ocean, but on an imported custom cloud server, the tutorials you reported to me cannot be used

Marzio,

I think you wrongly understand the usage of the database confections. And that is why you overcomplicating things.

You really need only one database connection and database definition in the database manager, just stick to the standard name “db”

Your docker database will be created automatically locally, and when you add a remote target to your cloud server - there will be also created a new database as well automatically.

So everything is done for your - you really don’t have to create manually two separate databases, just specify per target what database you want and your are done!

it will all goes via one database connection - that when local development is selected as target, will use your local database and when remote target is selected then it will use your remote database.

I supposte that Marzio do not want to use MySQL in docker but keep a MySQL instance on the server. Am I am wrong Marzio ?

Exact. Since Docker is free without a contract, I don’t have much confidence in Docker maintaining remote databases. If he decided to eliminate them it would be a serious problem. Not knowing how Resource Manager works, I’m not so sure that in case of problems I would be able to recover the database from a backup. However, there is also the problem that with an imported Custom server the tutorial for database management with Resource Manager is not possible.

The docker used by Wappler for deploy is the open source version that is an industry standard and not going anywhere.

So the whole server setup and installed services on the server are done by docker, no matter if per project or as a global service.

So docker will be used always and there is no need to do any kind of manual installations as those will cause you only trroubles.