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.
- In your panel open the server → Databases tab and create a database. Note the host, database name, username and password.
- Make sure
oxmysqlis in your/resources/folder and started before your framework. - In
server.cfgadd your connection string:set mysql_connection_string "mysql://USER:PASSWORD@HOST/DBNAME?charset=utf8mb4" - 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!