0%
Loading...
NolimitHost

How to setup Database for my FiveM Server?

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.

Creating a Database

  1. Log in to the NolimitHost Game Panel at https://panel.nolimithost.cc/ and select your FiveM server. Go to Management > Database.
  2. Click Create.
  3. Select an available Host.
  4. Name your database (e.g. fivem_db).
  5. Click Create Database — you will see your connection credentials.

Connecting the Database to FiveM

  1. Copy the connection string shown in the panel (format: mysql://user:pass@host/dbname).
  2. Stop the server from the Console page first, so the server doesn't overwrite your changes while you edit files.
  3. Open your server.cfg in the File Manager.
  4. Add or update the 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.

Troubleshooting

IP not accepted

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.

Database not connecting

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.

Tip: After changing your connection string or re-creating the database, restart the server from the Console so the change takes effect.