OxMysql multiple database connection

Hi, I have two databases, each with different access data.
However, only one database connection is specified in the server config.
How can I integrate a second, additional database on my server?

Mind if I ask why you are trying to run 2 at the same time? More info needed as I may have a better answer for you.

I have two databases because I want both databases to be separate. Once for the game server and once for the website where all and other user information is located.
And I would like to make certain queries from the second database in some scripts.
However, I have no idea how I could best do it at FiveM.
In PHP I would know ^^

Create an API for your website. Then use that API to fetch and push data from the game server.

Then I would have to use HTTP Request in my Lua scripts right?
Or how would you recommend it for me?

Yes. You would use HTTP requests. To be honest you are better off communicating with your web app over auth’d api routes. That way say (maybe you wanna access website data outside of the game server as well) you can.

Just be sure when setting up your API you authenticate the routes somehow (if they contain sensitive data or allow them to do any deleting, updating, etc of your database).

If you are just using getters (for non sensitive data) this will be really simple as more then likely you wont need auth’d routes but any other time you will def want auth’d routes.

https://docs.fivem.net/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequest/

All right, then I’ll take a look and, if necessary, ask again.
But for now I thank you.

No problem. I have experience setting up API’s as well. If you have any questions at all feel free to ask. I am sure myself or even anyone else who has experience with API’s on here would be happy to assist you.