> ## Documentation Index
> Fetch the complete documentation index at: https://help.creepercloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Setup MariaDB Database

> Mysql based databases on Creepercloud

<Note>
  Setting up a database is essential for many Minecraft plugins and applications. This guide makes the process simple!
</Note>

## Setup Process

<Steps>
  <Step title="Create a server with MariaDB egg">
    Visit [Create server](https://deploy.creepercloud.io/create) and select the MariaDB egg when creating your server.

    <Frame>
      ![Database creation screen](https://mintlify.s3.us-west-1.amazonaws.com/core-link/images/database-create.png)
    </Frame>
  </Step>

  <Step title="Start the server">
    Make sure your server is running before proceeding to the next steps.

    <Frame>
      ![Database server start screen](https://mintlify.s3.us-west-1.amazonaws.com/core-link/images/database-server-start.png)
    </Frame>
  </Step>

  <Step title="Create your database">
    Run the following command in your server console:

    ```sql
    CREATE DATABASE dbname;
    ```

    <Tip>
      Replace `dbname` with a name relevant to your project (e.g., `minecraft_economy`).
    </Tip>

    <Frame>
      ![Database creation console screen](https://mintlify.s3.us-west-1.amazonaws.com/core-link/images/db-create-console.png)
    </Frame>
  </Step>

  <Step title="Create a database user">
    Create a user with the following command:

    ```sql
    CREATE USER 'dbusername'@'172.18.0.1' IDENTIFIED BY 'password';
    ```

    <Warning>
      Always use a strong, unique password! Weak passwords can compromise your server security.
    </Warning>

    <Frame>
      ![Database user creation console screen](https://mintlify.s3.us-west-1.amazonaws.com/core-link/images/db-create-user-console.png)
    </Frame>
  </Step>

  <Step title="Link the user to the database">
    Grant the user privileges with:

    ```sql
    GRANT ALL ON dbname.* to 'dbusername'@'172.18.0.1' IDENTIFIED BY 'password' WITH GRANT OPTION;
    ```

    <Frame>
      ![Database grant User permission console screen](https://mintlify.s3.us-west-1.amazonaws.com/core-link/images/db-grant-user-console.png)
    </Frame>
  </Step>
</Steps>

## Important Notes

<CardGroup cols={2}>
  <Card title="Security" icon="shield-halved" color="#ff0000">
    Use a secure password that includes uppercase, lowercase, numbers, and special characters.
  </Card>

  <Card title="Naming" icon="tag" color="#0000ff">
    Choose meaningful names for your database and users to keep track of their purpose.
  </Card>

  <Card title="IP Configuration" icon="network-wired" color="#00ff00">
    The default IP (172.18.0.1) is for local connections. Use your node IP if different!
  </Card>

  <Card title="Backups" icon="rotate" color="#ffff00">
    Regularly backup your database to prevent data loss.
  </Card>
</CardGroup>

## Accessing Your Database

Use these credentials when configuring your applications:

```yaml
database:
  host: 172.18.0.1  # Enter your node IP if different
  name: dbname      # Your database name
  user: dbusername  # Your database username
  password: password  # Your secure password
  port: 3306        # Default MariaDB port
```

<Note>
  Need help? Our support team is ready to assist you with any database configuration issues!
</Note>
