---
title: "Setting Up a MySQL Database for FiveM"
description: "Learn how to create and connect a MySQL database to your FiveM server for scripts and data storage."
url: https://help.chiphead.tech/en/articles/409-setting-up-a-mysql-database-for-fivem
collection: "FiveM"
updated: 2026-06-11
language: en
---

# Setting Up a MySQL Database for FiveM

Learn how to create and connect a MySQL database to your FiveM server for scripts and data storage.

**Connect your FiveM server to a MySQL database to store player data, jobs, and other important information.**

Some **FiveM** templates require a database connection to save player data and server information. Setting up a database ensures your server can store and manage data efficiently. This guide will show you how to create a database and connect it through **txAdmin**.

> **Info:** **Note:**
> This guide is part of the full FiveM setup process. If you don’t see the database configuration fields, check out our **Getting Started with FiveM** guide first.

* * *

### Creating Your Database

1.  Log in to your **ChipHead Panel**.
    
2.  Navigate to the **Databases** section.
    
    ![](https://staticfiles.gleap.io/gattachments/3ShPBshBBt4ovTzLHUNGXUQV4fiz2eb4KINznqLr1RgUivAdi73MNjTepZiEBtK114W1TeDpRCs.png)
    
3.  Enter a name & Click **Create Database**.
    
    ![](https://staticfiles.gleap.io/gattachments/ShfkTJC35iVFcpNgOBYE2XOj2rqjTbSc0U26tGqkmjPhY9cNLGhbJofInZlFvM39iop6N8DOvCB.png)
    
4.  Select **View Details** to see username & password.
    
    ![](https://staticfiles.gleap.io/gattachments/9z3Jb3reHeTx2pGe1UAFKL7WvTWLYWgQNTTxboybGf4AO62U0mHbjPmUPO0FyESsE9lpzYf0OVc.png)
    
    ![](https://staticfiles.gleap.io/gattachments/neFlDYddf3Cv48Zv72JiaUdpPGD09PK1h04bRfNqqkDK1T2VL372LkywxmVUtkCDp2t1GWczMRv.png)
    
5.  Make sure to note down the **database name, username, password, and host** - you’ll need these later when connecting.
    

* * *

### Entering Your Database Connection Details

> **Info:** **Note:**
> If you don’t see an option to enter connection details, your template may not require a database. Refer to our **FiveM setup guide** for more information.

1.  In **txAdmin**, enable **Database Options** during setup.
    
2.  Enter the following details from your database:
    
    -   **Host**
        
    -   **Username**
        
    -   **Password**
        
    -   **Database Name**
        
3.  Run the setup recipe to connect your server.
    

Once your FiveM server has successfully connected to the database, it will begin storing data automatically.

* * *

> **Success:** **All done!**
> Your **FiveM** server is now connected to its database. You can continue setting up your scripts and resources, confident that all player progress and data will be safely stored on your **ChipHead** hosted server.
