Applies to: FiveM on the Gravel Host Panel · Time: about 10 minutes · Difficulty: Intermediate
Most FiveM frameworks, such as QBCore and ESX, store player data like inventories and money in a MySQL database. This guide creates the database, connects it to your server and shows where to import an .sql file.




Open Files and click server.cfg to edit it.

Add one connection string, replacing each value with your database details. Either format works:
set mysql_connection_string "mysql://databaseuser:databasepassword@endpoint:3306/databasename"
set mysql_connection_string "user=databaseuser;password=databasepassword;host=endpoint;port=3306;database=databasename"
Save the file and restart the server.
.sql file. To import it, log in to the database web panel shown on your Databases tab: mysql.gravelhost.com or eu.sql.gravelhost.com.
.sql file.Watch the Console as the server starts. Your MySQL resource should report that it connected, with no database errors.
The username or password in the connection string is wrong. Copy them again from the Databases tab, save server.cfg and restart.
Check the endpoint and port in the connection string match the Databases tab exactly.
Still stuck? Our team is on Discord, or open a ticket from the Billing Panel.