How can we help?

Search our guides and tutorials, or browse the categories below.

FiveM: connect your MySQL database

Your FiveM plan includes a MySQL database. RP frameworks (ESX, QBCore) use oxmysql to talk to it, and it must be reachable at boot or the framework will restart in a loop.

  1. In your panel open the server → Databases tab and create a database. Note the host, database name, username and password.
  2. Make sure oxmysql is in your /resources/ folder and started before your framework.
  3. In server.cfg add your connection string:
    set mysql_connection_string "mysql://USER:PASSWORD@HOST/DBNAME?charset=utf8mb4"
  4. Restart. The console should show oxmysql connect successfully.

Import your framework’s .sql files into the database (via the panel or a tool like HeidiSQL) before first use.

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.