Create a database
This guide explains how to create a database for your FiveM server.
Via the YorkHost Panel​
- Log in to your Game Panel:
- game.yorkhost.fr for standard servers
- manager-game.yorkhost.fr for Ryzen servers
- Select your FiveM server
- Go to the Databases tab
- Click New Database
- Give your database a name
- Click Create Database
Retrieve information​
After creation, you will get:
- Host: MySQL server address
- Port: Connection port (usually 3306)
- Database: Database name
- Username: Username
- Password: Password (click the eye to see it)
Configuration in server.cfg​
Add the connection in your server.cfg:
set mysql_connection_string "mysql://USERNAME:PASSWORD@HOST:PORT/DATABASE?charset=utf8mb4"
Replace the values with those obtained previously.
Test the connection​
To verify that the connection works, you can use a MySQL client like HeidiSQL or phpMyAdmin.
warning
Never share your database credentials.