TABI CLOUD
FiveM

FiveM Database Errors: Fixing oxmysql Connection Problems

5 min read · Updated October 2026 · By Tabi Cloud

ESX and QBCore store players, vehicles, items and jobs in a MySQL or MariaDB database. FiveM servers usually connect to it through the oxmysql resource. If the database is wrong, you will see errors on startup or players will lose data.

How the connection works

oxmysql reads a connection string from server.cfg. It looks like this pattern, with your own details in place of the placeholders:

The details come from your database provider or panel. Keep the line above the point where oxmysql and your framework are ensured.

Common errors and fixes

Importing SQL files

  1. Open your database tool, such as phpMyAdmin if provided.
  2. Select your database.
  3. Use Import and pick the .sql file from the script.
  4. Check that tables appear, then restart the server.

Tips

Older servers may still use the legacy mysql-async resource. Do not run two database resources that provide the same connection at once. If you are unsure which resource your scripts expect, check their documentation.

Want your own server? Join our Discord and tell us the game. We set it up and send you the details. Need help with an error from this guide? Open a ticket there.

GET STARTED ON DISCORD

More guides

FiveMHow to set up a FiveM server with txAdminFiveMHow to Add Admins and Set Permissions on a FiveM ServerFiveMFiveM Resource Not Starting: Common Causes and Fixes