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

# Databases

> Create and manage MySQL, PostgreSQL, and SQLite databases with a built-in query runner, table browser, user management, and backups.

<Info>
  **Path:** Databases (`/databases`) — Admin only

  Manage databases across your connected servers — organized by engine type across four tabs.
</Info>

## MySQL & PostgreSQL Tabs

Both tabs follow the same layout.

### Databases View

Lists all databases on the server with name, size, and type. Three actions per database:

| Action          | Description                       |
| --------------- | --------------------------------- |
| **View Tables** | Opens the Database Explorer modal |
| **Backup**      | Creates a dump of the database    |
| **Drop**        | Permanently deletes the database  |

### Users View

Switch to the Users view (toggle button next to the Databases button) to see all database users with their username and host. Drop any user with the **Drop** action.

### Creating a Database

Click **Create Database** to open the creation modal:

<Tabs>
  <Tab title="MySQL">
    | Field         | Options                                  |
    | ------------- | ---------------------------------------- |
    | Database name | Lowercase alphanumeric                   |
    | Charset       | utf8mb4 (default), latin1, etc.          |
    | Collation     | utf8mb4\_unicode\_ci (default)           |
    | Create user   | Checkbox — auto-creates a dedicated user |
    | Password      | Auto-generated or manual                 |
  </Tab>

  <Tab title="PostgreSQL">
    | Field         | Options                                  |
    | ------------- | ---------------------------------------- |
    | Database name | Lowercase alphanumeric                   |
    | Encoding      | UTF8 (default), LATIN1, SQL\_ASCII       |
    | Create user   | Checkbox — auto-creates a dedicated user |
    | Password      | Auto-generated or manual                 |
  </Tab>
</Tabs>

***

## Database Explorer

The explorer opens as a modal when you click **View Tables** on any database.

<CardGroup cols={2}>
  <Card title="Table Sidebar" icon="list" color="#6366f1">
    Searchable list of all tables with row counts. Click any table to load its schema and data.
  </Card>

  <Card title="SQL Runner" icon="code" color="#10b981">
    Run any SQL query directly — supports Ctrl+Enter. Results appear in the table below.
  </Card>
</CardGroup>

### Columns View

Shows each column's name, data type, and constraint badges:

* **PK** — Primary Key
* **NN** — Not Null

### Data View

Editable table showing the rows in the selected table. Admins can edit cell values inline and delete rows. A separate **Edit** modal provides a form view for all columns of a selected row.

***

## Docker Apps Tab

Lists Docker apps that have an associated database. Shows the app status and port, and provides a **View Databases** button that opens a modal with the database connection string.

***

## Backups Tab

Backup list for all databases. Filter by type (All / MySQL / PostgreSQL).

| Column       | Description               |
| ------------ | ------------------------- |
| **Database** | Database name             |
| **Filename** | Backup file name          |
| **Size**     | File size                 |
| **Created**  | Backup timestamp          |
| **Type**     | MySQL or PostgreSQL badge |

Delete any backup from the list.

***

## SQLite Tab

Scans the server filesystem for SQLite database files. Shows the database name, file path, and size. Click **Tables** to browse the schema and data using the same Explorer interface.

***

## Creating a Database User

From the Users view, click **Create User** to add a new user:

* **MySQL:** username, password (with auto-generate), host (`localhost` / `%` / `127.0.0.1`), and optional grant to an existing database
* **PostgreSQL:** username, password, and optional grant to an existing database
