# FiveM: connect your MySQL database

https://yn-hosting.com/knowledgebase/article/fivem-connect-your-mysql-database

Your FiveM plan includes a **MySQL database**. RP frameworks (ESX, QBCore) use **oxmysql** to talk to it, and it must be reachable at boot or the framework will restart in a loop.

1. In your panel open the server → **Databases** tab and create a database. Note the **host, database name, username and password**.
2. Make sure `oxmysql` is in your `/resources/` folder and started before your framework.
3. In `server.cfg` add your connection string:
`set mysql_connection_string "mysql://USER:PASSWORD@HOST/DBNAME?charset=utf8mb4"`
4. **Restart**. The console should show oxmysql connect successfully.

Import your framework’s `.sql` files into the database (via the panel or a tool like HeidiSQL) before first use.
