FiveM: Set up ESX or QBCore with a database

Set up an ESX or QBCore framework with txAdmin and connect it to your included MySQL database.

2 minute read Updated 08.11.2026

ESX and QBCore are the most popular frameworks for roleplay servers. Both store players, vehicles and inventories in a MySQL database. One database is included in every FiveM plan.

1. Create the database

  1. In the client area, open your server → Databases tab.
  2. Click New database.
  3. You now see Address, Port, Database, User and Password. Keep the page open – you'll need these values shortly.

2. Enable txAdmin

  1. Startup variables tab → set txAdmin (TXADMIN_ENABLE) to 1.
  2. Restart the server. The Console shows the txAdmin address and a PIN.
  3. Open the address in your browser (the txAdmin port is listed in the Ports tab), enter the PIN and link your Cfx.re account.

3. Install ESX or QBCore

  1. In txAdmin, choose ESX Legacy or QBCore Framework under Popular Recipes.
  2. Enter your license key if txAdmin asks for it.
  3. In the database settings, enter the values from the Databases tab – not localhost:
    • Host: Address
    • Port, User, Password and Database name
  4. Click Run Recipe. txAdmin downloads the framework and creates the tables – this takes a few minutes.
  5. Finally, click Save & Start Server.

Uploading your own ESX/QBCore

If you upload your framework yourself via the Files tab, add the database to server.cfg:

``
set mysql_connection_string "host=ADDRESS;port=PORT;user=USER;password=PASSWORD;database=DATABASE;charset=utf8mb4"
``

Replace the uppercase placeholders with the values from the Databases tab. ensure oxmysql must come before ensure es_extended or ensure qb-core.

Good to know

  • Open database in the Databases tab shows the tables right in your browser.
  • If you set a new password under Databases, change it in server.cfg as well and restart the server.
  • Need more databases, e.g. for a test server? Manage → Book more resources.
  • How to connect and enter the license key is explained in "FiveM: Connect and set up your server".
Was this helpful?