Article: How to install OxMySQL on your FiveM Server
How to install OxMySQL on your FiveM Server
What is OxMySQL?
OxMySQL is a tool used in FiveM, a program that lets people play customized versions of GTA V online with others. It helps FiveM work with certain types of databases (MySQL databases) to store and manage game information, like player data, efficiently. This tool acts like a bridge, making it easier for the game server to talk to and use these databases.
OxMySQL is a great way to connect to your database whether you are running a FiveM Server or a RedM Server.
How to install OxMySQL Manually
To install OxMySQL you are going to want to head over to the Official OxMySQL Github Repo and download the files. The files should be in a .ZIP file format, make sure you get the most Stable Version. This is what we recommend.
The latest version at current time of making this guide is Version 2.7.7. When you get to the releases page, click on the "oxmysql.zip" and it should now download to your PC.
Now you have downloaded the .ZIP file, you are going to want to head over to your FiveM Server and go into the /resources folder. Then you will need to extract the file oxmysql.zip that you had just downloaded into the /resources folder.
Now you have extracted the contents of the .ZIP file into your resources folder, you are going to want to head back to the main directory and head over to the "server.cfg" file.
Once you are in the server.cfg file you are going to want to add two lines, the first line being:
ensure oxmysql
The second line you are going to add will be the mysql connection string, this connection string will allow your server to communicate with your database. If you don't add this line, then the server won't communicate with your database and therefore you won't be able to load into your server.
set mysql_connection_string "server=CHANGE;port:3306;database=DATABASENAME;userid=USERNAME;password=PASSWORD;"
Change all the correct details of your database details such as; Server, Database, UserName, Password. These details will be different for everyone so make sure you carefully enter your details in.
âť—
OxMySQL does not support the use of the '=' symbol in database passwords. Therefore, you might need to repeatedly create new passwords until you get one that doesn't contain this symbol
How to install OxMySQL Automatically
If you are using Realms Hosting for your FiveM Server or RedM Server then you will get access to the Mod Manager. This Mod Manager is a One-Click installer, meaning you don't have to do any of the hardwork of downloading the files and uploading them.
Firstly, you are going to want to head to your server dashboard on the Realms Game Panel and head over to the "Mod Manager" section.
When you get to the Mod Manager section you will then see a bunch of Scripts you can install directly onto your FiveM server. In this case we will be using OxMySQL.
Click on the blue install button and OxMySQL will then install directly onto your server. You will be able to then find the OxMySQL files in /home/container/resources/[standalone]/oxmysql
Then you need to head over to your server.cfg file and do the last steps that were in the section above.
Still getting problems?
If you are still facing issues on installing OxMySQL or even setting up your database to run OxMySQL then don't hesitate to contact our support team, which you can find here.
Want to install QBCore now you have OxMySQL Installed?
Now you have OxMySQL installed, now its time to install a framework into your FiveM Server to create a roleplaying experience. Head over to our guide on How to install QBCore.