VU Community Forums

Connection to external Database

Is it possible to connect to an external Database via a mod, i would like to send and save data in a database on an external server.

If its not possible to connect to the database directly would it be possible to send the data via a web API?

As you can probably guess i am fairly new with lua, so any help and thoughts are appreciated.

You can use VeniceEXT Net Library, it has some methods for HTTP protocol. Also SQL Library is available for the server side.

1 Like

Oh yeah, i overlooked the net library, thanks a lot!

The SQL Libary is only for a local DB file or am i wrong? I mean i don’t think it would help me in my case because i want to use a MariaDB server, but can you set the library up for external use in the wiki aren’t any configuration options mentioned.

I think the SQL Library uses SQLite, which is a file based database. Transferring it over the network is simple as copying a file from an server to another, but manually manipulating the file while is being used by the library can cause problems.

A better solution is using Net Library to transfer the data between the servers and build a replica of your MariaDB structure using SQL Library.

Hello it is possible to conect external DB (mariadb for us)
have a good day

What mod is this with stats ?