Installing Dependency
The vehicle and weapon system relies on a single dependencies: oxmysql. below is our guide on installing oxmysql and setting up a sql server on windows.
Oxmysql (Windows Version)
Installing SQL server
Installing XAMPP:
Step 1: Download and Install XAMPP
- Visit the Official XAMPP Website: Go to Apache Friends and download the XAMPP installer for Windows. 
- Run the Installer: Launch the downloaded installer. You might need to approve the UAC prompt and disable any antivirus temporarily if it blocks the installation. 
- Select Components: During installation, ensure that Apache, MySQL, and PHP are selected. You can deselect other components unless you know you'll need them. 
- Choose Installation Directory: You can install XAMPP in the default directory ( - C:\xampp) or choose another location. Click Next and proceed with the installation.
- Complete Installation: Follow the remaining prompts and finish the installation. 
Step 2: Start Apache and MySQL
- Launch XAMPP Control Panel in Administrator: After installation, open the XAMPP Control Panel. You can find it in the Start Menu or where you installed XAMPP. 
- Installing services: When XAMPP opens up click the ❌ button on the left side of Apache and MySQL and install the services. 

- Start Apache and MySQL: Click the 'Start' buttons next to Apache and MySQL. This will run your local server and database server. 
Step 3: Creating The Database
- Open phpMyAdmin: Open phpMyAdmin using the - AdminButton on Apache.

- Creating a database: Upon opening phpMyAdmin click new on the top left then type for database name - fivem(all lowercase) then click create.

Congratulations, you now know how to create a fivem database. Move on to the next page to continue the installation.
Creating an SQL string
Creating your connection string:
- Visit the MySQL String Generator Website: Here 
- Click - Nexttwice until you are on- 3: Configure the FXServer.

- After you are on the 3rd page, scroll down until you see this: 

- The following information will be required for your connection string to work: (Some other things you can add will be: acquireTimeout and connectTimeout - These will make the string take longer before connecting / pushing an error.) 
- User 
- database 
- host 
- password 

- After filling out the info regarding your database and you should see a section called - FXServer Configuration
- Copy the line shown below from the website and paste it into your server.cfg and restart your server 

Ensuring oxmysql or mysql-async
Whether you use oxmysql or mysql-async the way you ensure the it matters.
- Put the following lines of code into your server.cfg below all the default resources required by FiveM. 
- When downloading the files from github always select the releases version on the right side. 

set mysql_connection_string "host=localhost;user=root;database=fivem"
ensure oxmysql -- Only if using oxmysqlCongratulations, you connected your database to your FiveM Server!
Last updated
Was this helpful?
