> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.vibegames.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Connect your server to a database

| In this tutorial we will show you how to connect your server to a database using ESX. Other resources/frameworks might require a different configuration. Always read the documentation if your resource.

First make sure [you have created the database](/en/article/how-to-create-a-database-et1vad/) and [imported all SQL files](/en/article/how-to-import-an-sql-file-pedsp2/) that where included with your resources!

1. Open your server.cfg ([How to use WinSCP](/en/article/how-to-manage-your-files-via-ftp-using-winscp-xprfdm/))
2. Add this on top of your server.cfg:

```set es_enableCustomData 1
set mysql_connection_string "server=HOST;uid=USERNAME;password=PASSWORD;database=DBNAME"```

![](https://i.imgur.com/NJ6TJlI.gif)

3. Change the parameters. 
- Replace HOST with your database IP.
- Replace USERNAME with your database username
- Replace PASSWORD with your database password
- Replace DBNAME with your database name

4. Save the file.
5. Restart your server.

# Find your database credentials
In your control panel go to ++databases++ in the menu.

|| How to find your database name ![](https://i.imgur.com/WaZ4ihI.png)
|| How to find your database user: Click on the eye button ![](https://i.imgur.com/vXahK3h.png)
|| How to find your database password: Click on the eye button ![](https://i.imgur.com/mG0V2rl.png)
|| How to find your database IP/host: Click on the eye button ![](https://i.imgur.com/u9oLm3M.png)
