NolimitHost
Last updated: August 18, 2026
This guide shows you how to create a MySQL database for your FiveM server and connect it, so frameworks like ESX or QBCore can store player and server data.
fivem_db).mysql://user:pass@host/dbname).server.cfg in the File Manager.set mysql_connection_string line with your credentials:set mysql_connection_string "mysql://USER:PASSWORD@HOST/DBNAME"
Save the file, then start the server again from the Console. Your FiveM resources (e.g. ESX, QBCore) will now be able to connect to the database.
When you enter the host in the connection string, make sure you remove the :3306 port from the IP address. For example use host instead of host:3306.
Only keep the port in the connection string if the database host uses a port other than 3306.
Make sure that when creating the database, the host allows connections from everywhere (set the allowed host to %), or at least from the same machine the server runs on. If connections are restricted to a specific IP, your FiveM server may not be able to reach the database.
This website uses cookies to ensure security, session management, and basic functionality. For details on all cookies used and how to manage your preferences, please see our Privacy Policy.