Intermediate 10 min

MySQL database (oxmysql)

Configure the database and Oxmysql connection for your ESX/QBCore frameworks.

#MySQL#oxmysql#Database

Ready to start your service? Check offers and order online.

View offers and order

Why a database?

The frameworks (ESX, QBCore) and most scripts store player data (accounts, inventories, vehicles) in a MySQL/MariaDB database via the oxmysql resource.

Create the database

  1. Create a database and user (panel or phpMyAdmin)
  2. Import the SQL schema provided by your framework
  3. Note host, port, user and password

Configure oxmysql

In the server.cfg, inform the connection chain:

  • set mysql_connection_string "server=HOST;database=DBNAME;userid=USER;password=PASS"
  • Make sure that ensure oxmysql is started before scripts

Check & troubleshoot

  • On startup, the console indicates the successful Oxmysql connection
  • Login error: check user IDs, host and rights
  • Save your base regularly