# Database Sync Credentials

{% hint style="info" %}
Database Sync is not enabled with the free version of Sonoran CAD.\
For more information, see our [pricing](https://docs.sonoransoftware.com/cad/pricing/faq) or view how to check your community [limits](https://docs.sonoransoftware.com/cad/tutorials/getting-started/view-your-limits).
{% endhint %}

{% hint style="success" %}
Looking for VPS, web, or dedicated hosting? Check out our official [server hosting](https://docs.sonoransoftware.com/cad/integration-plugins/database-sync-and-merge/broken-reference)!
{% endhint %}

Database Sync is a read-only system. All characters, licenses, and vehicle registrations pulled from your database can not be modified in the CAD.\
\
Database Merge allows you to save off additional, manually specified data in the CAD.

## 1. Getting your Credentials

{% tabs %}
{% tab title="phpMyAdmin" %}

### phpMyAdmin - Database Credentials

**1. Navigate to your phpMyAdmin Web Panel**

**2. Navigate to User Accounts**

At the top of your screen click on **`User Accounts`**.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MWjLG7HtAlKwEkWLU1g%2F-MWjLzfxRef-WszvYJiD%2Fimage.png?alt=media\&token=4a72ab4b-b1f5-443c-a488-3d7d9e6bdc5f)

**3. Create a new user account**

![phpMyAdmin - New User Account](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MWjLG7HtAlKwEkWLU1g%2F-MWjN9cKTJEAThsUa5ZG%2Fimage.png?alt=media\&token=f107ea14-ee05-4cd4-9a8a-12351fa178bf)

**4. Fill out the account information**

The `Host Name` field should be set as `Any Host` and the value as `%`. This will allow external IPs (Sonoran CAD) to connect to your database.

![phpMyAdmin - New User Information](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-PVxIlMC_0mCUJVqM%2F-MX-QLCPQG94DRhsVKkE%2Fimage.png?alt=media\&token=c347f7dc-5dd3-466e-9932-99a8a376d35b)

**5. Once created, edit the user account privileges**

![phpMyAdmin - Edit Account Privileges](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-PVxIlMC_0mCUJVqM%2F-MX-RAa8To9-btZ6p8o3%2Fimage.png?alt=media\&token=a1cb8552-e677-49b7-9e89-639117cc8cc6)

**6. Select your specific database**

![phpMyAdmin - Set Database](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-PVxIlMC_0mCUJVqM%2F-MX-RM4rqRoKm356kqMn%2Fimage.png?alt=media\&token=97d32f75-2c6a-4cf6-8776-e9b7144a3f0f)

**7. Select only the required permissions**

`SELECT` and `SHOW VIEW` will ensure this account can only read from your database.

![phpMyAdmin - Read Only Permissions](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-PVxIlMC_0mCUJVqM%2F-MX-RfXYmnK-1fvTV8nj%2Fimage.png?alt=media\&token=ee9d1f1a-c35d-4bef-a321-bec586fa7ff3)

**8. Save the user and set credentials in Sonoran CAD**

You will now want to go to <http://whatsmyip.org> and get your Public IP Address to use as your Host.

Database Translation Informatio&#x6E;**:**

| phpMyAdmin | SonoranCAD   |
| ---------- | ------------ |
| Host       | Host/Address |
| Database   | Database     |
| User name  | Username     |
| Password   | Password     |

{% hint style="warning" %}
See [Database Sync and Merge Connection Credentials](https://docs.sonoransoftware.com/cad/integration-plugins/database-sync-and-merge/..#written-configuration-guide) to figure out how to add Credentials to your CAD Instance using the information above.
{% endhint %}
{% endtab %}

{% tab title="HeidiSQL" %}

### HeidiSQL - Database Credentials

**1. Login to your database using HeidiSQL.**

**2. Open the User Manager**

At the top of your screen click `Tools` and then `User Manager.`\
Then, click `Add` at the top left.

![HeidiSQL - Open User Manager](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MWjPCU4I1t2iuYy2kBz%2F-MWjQT3UVuP7D4kx9Q6-%2Fimage.png?alt=media\&token=ad46a883-43eb-49be-ab18-d23c50286df5)

**3. Enter the Account Information**

Enter a user name, password, and enter `%` in the From host field. This will allow external IPs (Sonoran CAD) to connect to your database.

Under `Allow Access To` select `Add Object`

![HeidiSQL - User Account Credentials](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-Syjn2Zik9O5EoGuj%2F-MX-VTOzcsf8Ec5M1Jid%2Fimage.png?alt=media\&token=ba952e8a-fe9a-40a7-8e2b-4bb4111fff4c)

**4. Select the Database**

Select the name of your database, then hit `Ok`.

![HeidiSQL - Select Database](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-Syjn2Zik9O5EoGuj%2F-MX-W-nvHtc_EpPSUaZh%2Fimage.png?alt=media\&token=c74ae305-fc74-4597-b119-f8a287966ffb)

**5. Select the Permissions**

Check off the `EXECUTE`, `SELECT`, and `SHOW VIEW` read permissions. Then press `Save`.

![HeidiSQL - Select User Permissions](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MX-Syjn2Zik9O5EoGuj%2F-MX-WNPCeOEkxJgYX6Gi%2Fimage.png?alt=media\&token=446c682d-0cbe-48f9-8b7d-bd99187c4099)

**6. Save the user and set credentials in Sonoran CAD**

You will now want to go to <http://whatsmyip.org> and get your Public IP Address to use as your Host.

Database Translation Information

| HeidiSQL  | SonoranCAD   |
| --------- | ------------ |
| Host      | Host/Address |
| User name | Username     |
| Password  | Password     |
| Database  | Database     |

{% hint style="warning" %}
See [Database Sync and Merge Connection Credentials](https://docs.sonoransoftware.com/cad/integration-plugins/database-sync-and-merge/..#written-configuration-guide) to figure out how to add Credentials to your CAD Instance using the information above.
{% endhint %}
{% endtab %}

{% tab title="Zap Hosting" %}

### Zap Hosting - Database Credentials

**1. Login**

Login to your Zap Hosting Account and Navigate to your FiveM Server.

**2. View the Tools Section**

Scroll down until you see **TOOLS** on the left hand side of your screen and select **`Databases`.**

![ZAP Hosting Tools - Database](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MWjHpWenG-fDb0Rt72R%2F-MWjK3UlEhRdpFy5I-3t%2Fimage.png?alt=media\&token=a7159c80-d224-4d9b-a886-72a7e4380bf8)

**3. View Database Credentials**

In the Center of your screen you will see you're database Credentials.

![Zap Hosting - Database Credentials](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MWjHpWenG-fDb0Rt72R%2F-MWjKPKbCo2z5AImerWB%2Fimage.png?alt=media\&token=4c3a960a-8acb-4060-b7bc-1b4d0bb30bf0)

**4. Set DB Credentials in Sonoran CAD**

Database Translation Information

| Zap Hosting | SonoranCAD   |
| ----------- | ------------ |
| Server/IP   | Host/Address |
| Database    | Database     |
| User        | Username     |
| Password    | Password     |

{% hint style="warning" %}
See [Database Sync and Merge Connection Credentials](https://docs.sonoransoftware.com/cad/integration-plugins/database-sync-and-merge/..#written-configuration-guide) to figure out how to add Credentials to your CAD Instance using the information above.
{% endhint %}
{% endtab %}
{% endtabs %}

## 2. Port Forwarding

If your database port has not already been opened, you will need to forward/open this port.\
Typically, the default MySQL port is `3306`.

To check if your MySQL port has been properly opened, [visit a port checking utility](https://www.yougetsignal.com/tools/open-ports/) and enter your MySQL server's IP address and port.

**If you are unsure how to open a port, you will need to contact your hosting provider.**

## Combine API and DB Sync Records

When a community uses database sync, all record lookups run against that community’s external database. Some communities may also want to include CAD records created through integrations such as ERS. Enabling this option allows lookups to return both in-game data, such as characters, licenses, and vehicles, and API-created characters and vehicles from ERS.

To enable this, turn on **Include CAD API records in DB Sync lookups**.

<figure><img src="https://232668649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4pGN81fb4R6zFhodcu%2Fuploads%2FQlWLghsuPQCsUJb4dHHx%2Fimage.png?alt=media&#x26;token=717324fd-d763-4214-ae35-f0d5e10b44b1" alt=""><figcaption></figcaption></figure>

## IP Whitelisting

My community wants to whitelist **only** the Sonoran CAD IP address to connect on this SQL user account. How can I do this?

You may whitelist the following IPs:

```
34.173.36.190
```

Last Updated : 1/15/2026
