Skip to main content
To set up a database for a FREAKHOSTING FiveM server, click Databases, then Create database, give it a name and click Create database. On the database card, click Show next to the password, choose FiveM (oxmysql) under FORMAT and click Copy. Paste that set mysql_connection_string line into server.cfg above your ensure lines, or into txAdmin’s recipe, and restart.

Before you start

  • You only need a database for frameworks such as QBCore, Qbox or ESX, or for scripts that save data. vMenu and plain servers don’t need one.
  • oxmysql must be installed. Framework recipes in txAdmin include it.

How to create a FiveM database

1

Open Databases

Open your server in the Game Panel and click Databases in the sidebar.
2

Create the database

Click Create database. Enter a name, for example fivem. The dialog shows the full name it will get, with a prefix. Leave Allowed to connect from on Anywhere and click Create database.
3

Show the password

On the new database card, click Show next to PASSWORD. The card shows HOST (port 3306), DATABASE, USER NAME and PASSWORD, each with Copy.
4

Copy the oxmysql line

Under FORMAT, choose FiveM (oxmysql) and click Copy. The card writes the full line with your details filled in.
See how to manage databases for everything else on the page.

How to add the connection string to server.cfg

1

Open the raw file

Click Server config under FIVEM, then Advanced: open the raw file.
2

Paste the line

Paste the copied line above your ensure lines. Remove any older mysql_connection_string line. It looks similar to this:
3

Start oxmysql first

Make sure ensure oxmysql comes before your framework and scripts:
4

Save and restart

Save the file and restart the server.
Using a txAdmin recipe? Paste the host, user name, password and database name from the card when the recipe asks for them. txAdmin writes the line for you. See how to install QBCore or ESX.

oxmysql connection string formats

oxmysql accepts two formats. Use only set, as the oxmysql documentation says:
If your password has special characters that break one format, try the other, or click Rotate password for a new one.

Frequently asked questions

How do I import a script’s .sql file?

Click Open in phpMyAdmin on the database card, or use HeidiSQL. See how to import an SQL file with HeidiSQL.

Why does oxmysql say it can’t connect?

Copy the line again from the card, check that it is above the ensure lines and that oxmysql starts first. If you clicked Rotate password, the old password stops working right away; copy the new line.

Are FiveM databases included in backups?

Make your own copy before big changes: export the database in phpMyAdmin or HeidiSQL. Deleting a database removes all its data, and no backup of the database is kept.

How many databases can I create?

The Databases page shows how many you use and how many your server allows.

FiveM server guide

Every FiveM guide in one place.

Import SQL with HeidiSQL

Run a script’s .sql file.

Install QBCore or ESX

Frameworks that need a database.

Resource start order

Start oxmysql before your framework.

Manage databases

Every option on the Databases page.
Tested by the FREAKHOSTING team on our Game Panel on 29 October 2026 (FXServer build 35245 (Recommended) with txAdmin). Formats checked against the oxmysql documentation.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: October 2026