> For the complete documentation index, see [llms.txt](https://docs.preva1l.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.preva1l.info/fadah/setup/database.md).

# Database

## Prerequisites (Requirements)

You must have a MySQL, MariaDB or MongoDB server setup.\
The server should be running on the latest version. (Help on finding a host is at the bottom)

## Configuration

Find the `config.yml` file in `plugins/Fadah/` and scroll down the `database` section.

Following the example below.\
Replace `<username>` with your database username. etc...

{% tabs %}
{% tab title="MySQL" %}
{% code title="config.yml" %}

```yaml
database:
  # Supported: SQLITE, MYSQL, MARIADB, MONGO
  type: "MYSQL"
  # Below is not required for SQLITE
  # For MySQL and MariaDB, uri must be a JDBC uri
  uri: "jdbc:mysql://<username>:<password>@<hostname>:<port>/Fadah"
  database: "Fadah"
```

{% endcode %}
{% endtab %}

{% tab title="MariaDB" %}
{% code title="config.yml" %}

```yaml
database:
  # Supported: SQLITE, MYSQL, MARIADB, MONGO
  type: "MARIADB"
  # Below is not required for SQLITE
  # For MySQL and MariaDB, uri must be a JDBC uri
  uri: "jdbc:mariadb://<username>:<password>@<hostname>:<port>/Fadah"
  database: "Fadah"

```

{% endcode %}
{% endtab %}

{% tab title="MongoDB" %}
{% code title="config.yml" %}

```yaml
database:
  # Supported: SQLITE, MYSQL, MARIADB, MONGO
  type: "MONGO"
  # Below is not required for SQLITE
  # For MySQL and MariaDB, uri must be a JDBC uri
  uri: "mongodb://<username>:<password>@<hostname>:<port>/?authSource=admin"
  database: "Fadah"
```

{% endcode %}
{% endtab %}

{% tab title="MongoDB (Atlas)" %}
{% code title="config.yml" %}

```yaml
database:
  # Supported: SQLITE, MYSQL, MARIADB, MONGO
  type: "MONGO"
  # Below is not required for SQLITE
  # For MySQL and MariaDB, uri must be a JDBC uri
  uri: "mongodb+srv://<username>:<password>@<hostname>/?retryWrites=true&w=majority&appName=myapp"
  database: "Fadah"
```

{% endcode %}
{% endtab %}
{% endtabs %}

Once you have completed the configuration, fully restart your Minecraft server and you will now be connected!

## Database Hosting

Most Minecraft hosting plans come with an included MySQL database. You can use this.\
However if you do not have access to said database with your host here are some you can use.

### MySQL

Google Cloud: <https://cloud.google.com/mysql/mysql-hosting>\
Digital Ocean: <https://www.digitalocean.com/products/managed-databases-mysql>

### MariaDB

CloudWays: <https://www.cloudways.com/en/mariadb-hosting.php>\
Amazon Web Services: <https://aws.amazon.com/rds/mariadb/>

### MongoDB

MongoDB Atlas: <https://www.mongodb.com/products/platform/atlas-database>\
(Normal MongoDB is self hosted only)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.preva1l.info/fadah/setup/database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
