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
- In the client area, open your server → Databases tab.
- Click New database.
- You now see Address, Port, Database, User and Password. Keep the page open – you'll need these values shortly.
2. Enable txAdmin
- Startup variables tab → set txAdmin (
TXADMIN_ENABLE) to1. - Restart the server. The Console shows the txAdmin address and a PIN.
- 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
- In txAdmin, choose ESX Legacy or QBCore Framework under Popular Recipes.
- Enter your license key if txAdmin asks for it.
- In the database settings, enter the values from the Databases tab – not
localhost:- Host: Address
- Port, User, Password and Database name
- Click Run Recipe. txAdmin downloads the framework and creates the tables – this takes a few minutes.
- 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.cfgas 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".