# Database

It is time to define and configure the **database**, but first some warnings and tips for better performance and to avoid errors.

{% hint style="danger" %}
If you are using the **BUNGEE** (BedWarsProxy) it is necessary to use **MySQL** or **MariaDB** to synchronize player data.
{% endhint %}

{% hint style="info" %}
By default, the database type and credentials are taken from the BedWars plugin core.
{% endhint %}

{% hint style="warning" %}
The **.sql** file when using SQLite is stored in BedWars1058 / BedWars Proxy/Cache/challenges.db
{% endhint %}

## Database Provider

The database provider is the one who provides the credentials to connect to the database, let's see how we can change the provider.

1. Open the add-on config.yml located in the Bed Wars plugin addons folder.
2. Search for the `storage` category and then search for the `data-provider`
3. Choose your data provider, either Challenges or BedWars

{% hint style="success" %}
If you choose **Challenges**, you can change all the values inside the storage category.
{% endhint %}

```yaml
# Storage / Database of add-on category.
# Please be careful changing options of this category.
# If you don't know what you are doing, please don't change anything.
storage:

  # The data provider determine if the database credentials
  # are handle by BedWars1058 / BedWarsProxy or by
  # BedWars1058 Challenges add-on.
  # Valid options are Challenges or BedWars.
  # - If "Challenges" is selected, you can modify the
  #   values below.
  data-provider: "BedWars" # Challenges or BedWars
```
