> For the complete documentation index, see [llms.txt](https://screamz2k.gitbook.io/phoenixc2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://screamz2k.gitbook.io/phoenixc2/maintenance/database.md).

# Database

## Config

You will find this part in the default.toml file under the `phoenixc2/server/data/configs`  directory:

```toml
[database]
type = "sqlite"
sqlite_name = "default"
user = "phoenix"
pass = "YourS3cuReP4ss"
host = "localhost"
port = 3306
database = "PhoenixFramework"

```

This is the part of the configs which specifies your database.

## Configuring the database

{% tabs %}
{% tab title="SQLite" %}
SQLite ist the default option.

There is only one configuration:

`sqlite_name` which represents the name of the .sqlite3 file
{% endtab %}

{% tab title="MySQL" %}
Log in using the your database, using the `mysql` utility.&#x20;

Replace HOST with the address of the database and PASSWORD with the password.

```sql
CREATE USER 'phoenix'@'HOST' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON PhoenixC2.* TO 'phoenix'@'localhost' WITH GRANT OPTION;
CREATE DATABASE PhoenixC2;
FLUSH PRIVLEGES;

```

After that update your database configuration:&#x20;

```toml
[database]
type = "mysql"
sqlite_name = "default"
user = "phoenix"
pass = "PASSWORD"
host = "HOST"
port = 3306
database = "PhoenixC2"

```

{% endtab %}
{% endtabs %}
