Connect the game server database
The MDT reads your FiveM server's real database: create a dedicated MySQL user, reachable from Agora, then fill in Server → Database.
Updated on Oct 5, 2026, 1:36 p.m.
On this page
In short. The MDT, live map, HR and dealership read your game server's MySQL or MariaDB database. Without it, the forum works, the rest does not. Everything is set in Server → Database, Game database connection box.
What Agora does in your database #
- It reads characters, jobs, ranks and vehicles, without changing them.
- It creates its own tables, prefixed
agora_, for MDT records. No foreign key on your tables. - It writes to your tables only for the dealership (debit and delivered vehicle).
1. Create a dedicated MySQL user #
Do not use root. The user must be able to connect from the IP address of the Agora machine:
CREATE USER 'agora'@'203.0.113.10' IDENTIFIED BY 'a-long-password';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, ALTER, REFERENCES
ON `your_database`.* TO 'agora'@'203.0.113.10';
FLUSH PRIVILEGES;Replace 203.0.113.10 with Agora's IP, and your_database with your framework's database. Without CREATE, the MDT cannot create its tables.
2. Find the host #
Agora runs in a container: for it, localhost and 127.0.0.1 mean the container itself.
| Where MySQL runs | What to enter |
|---|---|
| Same machine as Agora | The machine's IP on your local network |
| Another container of the same compose | The service name (e.g. mariadb) |
| Remote server | Its public IP or domain, port open to Agora's IP |
| Database managed by your panel | The host given by the panel, if reachable from outside |
With a connected panel (Server → Panel), Detect the configuration fills in the MySQL credentials for you and names the framework it found. If the framework is on Automatic, it stays that way: panel detection does not lock the choice.
If a different game database is already set, detection does not overwrite it: it shows "Panel database found (…) but NOT saved: another game database is already set…" and a Replace the game database with the panel's button. Click it only if that really is the database to use.
3. Fill in the form #
Server → Database, Game database connection:
- Framework: leave Automatic (recommended), the default on a new installation. Only pick ESX, QBCore or QBox to fix it.
- Host, Port (
3306), User, Password, Database. The port must be a number from 1 to 65535: otherwise saving is refused with a message, instead of writing a value that will not work. - Discord ID column: leave automatic detection.
- Save, then click Test.
Expected answer: the MySQL version and the number of characters. On Automatic, the test also names the framework in use and where it comes from, for example "Framework: QBox (automatic, from the database tables)". The password is encrypted at rest.
The framework: Automatic or fixed #
On Automatic, Agora finds the framework by itself by cross-checking what the in-game resource reports when it starts and the tables present in your database. Under the dropdown, the screen says what is detected right now, "Detected: QBox (reported by the in-game resource)", or "Not detected: …" with the reason.
If detection cannot decide (no framework tables in the database, both ESX and QBCore tables in the same database, or a disagreement with the resource), Agora does not guess: the MDT, the live map and the portal read no characters until something is detected, and the screen says why. Fix the cause, or fix the framework in the dropdown.
An installation that had already saved a framework keeps it as is. To switch to Automatic, pick Automatic and save. Details: Supported frameworks.
4. Attach the jobs #
Next, attach your jobs to the MDT: Configure the MDT.
How a player finds their characters #
Through their FiveM license, once they have linked their game (a code typed in the tablet). The Discord column of your database is no longer enough: any player can announce someone else's Discord. See Link your game.
If it fails #
Was this article helpful?
Related articles
- Supported frameworks: ESX, QBCore, QboxAutomatic or fixed framework, what Agora reads in each framework, how a player is recognised, and the start order to follow in server.cfg.
- Configure the MDT: services, jobs and permissionsPut each in-game job in a service, then tick job by job or rank by rank what it can do; off-game access is the most important permission.
- Game database unreachable or refusedETIMEDOUT, ECONNREFUSED, Access denied, table not found, framework not detected, missing CREATE right: the connection test errors and their fix.
- Console, panel and database explorer (Pro tier)Connect your Pterodactyl or Pelican panel to see the server state, start it, send commands, deploy the resource and explore the game database.