How to Make a Database for FiveM Server
When managing your FiveM server hosting, you might want to create a database to store:
Player Data
Bank Accounts
Property Information
And much much more...
In this guide, we’ll walk you through the entire process of creating and configuring a database for your FiveM server hosting to store this information.
To make a database for your FiveM server:
Login to Apollo Panel
Navigate to the Databases tab:

In the Databases tab, create a new database by clicking the "New Database" button.

Once you click the "New Database" button, You will then get a popup that will ask you for the following:
Database Name: Pick a database name that is distinct from your other databases.
Connections From: The connections from is typically left blank to allow connections from everywhere. Do not change this setting unless the plugin you are adding explicitly tells you to.
Database Location: The database location is important. The location should be the same as your FiveM server to reduce latency to the database. The database locations will have the same location prefix as the node name shown in the settings tab. For example, p-dtx means your server is in Texas, so you will want a database with dtx in the name.

phpMyAdmin is used to create databases, setup databases, edit databases, delete databases and more. To connect to phpMyAdmin, navigate to the Backups tab.
Locate the ellipsis menu on the right of the databases tab, select "Visit phpMyAdmin"

This will take you to a login page, which will look like this.

To get the login credentials, locate the details option in the same menu you found the phpMyAdmin option.

This will open a popup which will provide database details written in the menu.

The username and password fields will be the username and password to login to phpMyAdmin, as-well as any remote connections to your server.
To upload SLQ files into your FiveM database, you will need to follow the steps above under, How to connect to your phpMyAdmin. Once you have logged in your page will look something like this.

Locate the import tab at the top. It is about half way along the menu.

Once you are on the import tab, locate the choose file button.

There are options that are underneath that you can modify to your choosing. Then scroll to the bottom to find the import button.

Click this button and your SQL files will start the upload.
If you are unable to connect to your database, head back to the details tab and ensure you have the correct, endpoint and port. As well as correct Username and correct password. If you are still having problems, try with another software or method. If you are still having problems please create a support ticket and we will look into it for you.
If you are encountering this problem, then the server can not access the database because it don't exist. This may be because of a config issue, or the database may have been deleted. There isn't a simple fix to this, and you will need to first ensure that the database exists. If it does then you will need to reinstall your server or any add on software that you have added. If the database does not exist, you will need to create the database again.
Need further assistance? Open a ticket and contact our support team!
Created by: Cooper A, Mason Baker, Pierce G.
Player Data
Bank Accounts
Property Information
And much much more...
In this guide, we’ll walk you through the entire process of creating and configuring a database for your FiveM server hosting to store this information.
Setting Up The Database###
To make a database for your FiveM server:
Login to Apollo Panel
Navigate to the Databases tab:

In the Databases tab, create a new database by clicking the "New Database" button.

Once you click the "New Database" button, You will then get a popup that will ask you for the following:
Database Name: Pick a database name that is distinct from your other databases.
Connections From: The connections from is typically left blank to allow connections from everywhere. Do not change this setting unless the plugin you are adding explicitly tells you to.
Database Location: The database location is important. The location should be the same as your FiveM server to reduce latency to the database. The database locations will have the same location prefix as the node name shown in the settings tab. For example, p-dtx means your server is in Texas, so you will want a database with dtx in the name.

Connecting to phpMyAdmin
phpMyAdmin is used to create databases, setup databases, edit databases, delete databases and more. To connect to phpMyAdmin, navigate to the Backups tab.
Locate the ellipsis menu on the right of the databases tab, select "Visit phpMyAdmin"

This will take you to a login page, which will look like this.

To get the login credentials, locate the details option in the same menu you found the phpMyAdmin option.

This will open a popup which will provide database details written in the menu.

The username and password fields will be the username and password to login to phpMyAdmin, as-well as any remote connections to your server.
How to Get SQL Files into Your FiveM Database
To upload SLQ files into your FiveM database, you will need to follow the steps above under, How to connect to your phpMyAdmin. Once you have logged in your page will look something like this.

Locate the import tab at the top. It is about half way along the menu.

Once you are on the import tab, locate the choose file button.

There are options that are underneath that you can modify to your choosing. Then scroll to the bottom to find the import button.

Click this button and your SQL files will start the upload.
Fixing Common FiveM Database Errors
"Unable to establish a connection to the database!"
If you are unable to connect to your database, head back to the details tab and ensure you have the correct, endpoint and port. As well as correct Username and correct password. If you are still having problems, try with another software or method. If you are still having problems please create a support ticket and we will look into it for you.
"Error 1049 Unknown Database"
If you are encountering this problem, then the server can not access the database because it don't exist. This may be because of a config issue, or the database may have been deleted. There isn't a simple fix to this, and you will need to first ensure that the database exists. If it does then you will need to reinstall your server or any add on software that you have added. If the database does not exist, you will need to create the database again.
Need further assistance? Open a ticket and contact our support team!
Created by: Cooper A, Mason Baker, Pierce G.
Updated on: 25/01/2025
Thank you!