Use a MariaDB DB for an external app

SYSTEM INFORMATION
OS type and version Ubuntu Server 22.04
Virtualmin version Latest

Hihi ^^ I’ve a little question about MariaDB on a Virtualmin server.

I want to make a Discord bot and use a MariaDB databse hosted on my Virtualmin server. It’s the same as with Wordpress but from node.js instead of php…

The thing here is, where can I access a MariaDB database from the outside of the network?

For example, my domain in xurxomf.xyz and I want to log on the database using that domain…
Wordpress uses localhost as host so idk if there is any config needed.
Also, I’ll need an user and a password to connect, which one can I use? The same as the Virtual doman users right?

If there is any guide about this topic please, let me know, I couldn’t find any.

Wrong. It will be the login and password that you see in Virtualmin → Edit Databases

And on the same page / screen, there is a tab captioned Remote Hosts. You need to enter the host / ip address of the server outside your network.

You may or may not need to do this:
Webmin → Servers → MariaDB → MariaDB Server Configuration and set MariaDB server listening address to any

And restart the database server.

Yes, but you probably should make a new one just for this purpose for security. Remote database connections are very high risk.

You’ll also want to enable and test TLS in MariaDB, so everything is encrypted. None of this is different in a Virtualmin system. MariaDB docs are authoritative for enabling remote access. The only thing to know is that the firewall in a Virtualmin system is firewalld, by default, so you’ll want to open the MariaDB port using firewall-cmd (or the Webmin FirewallD module.

Will the additional database users that you can create with Virtualmin Pro do the trick?

No need for that just create a new user from the webmin mysql module give that user access to the required database and required permissons not forgetting to set the correct gost also

There are many ways to create new database users. That’s one of them.