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

# Connect to MySQL

> Connect Tamery to MySQL or MariaDB: connection string format, SSL options, and provider tips.

Tamery supports MySQL and MariaDB via the `mysql://` scheme:

```bash theme={null}
mysql://username:password@hostname:3306/database
```

| Part       | Description                                 |
| ---------- | ------------------------------------------- |
| `username` | MySQL user (e.g. `root`)                    |
| `password` | Password for that user                      |
| `hostname` | Host (e.g. `localhost` or a remote address) |
| `3306`     | Port (default)                              |
| `database` | Database name                               |

## SSL / TLS

Enable SSL with query parameters:

```bash theme={null}
mysql://username:password@hostname:3306/database?ssl=true
```

To reject untrusted certificates, add `sslrejectunauthorized=true`:

```bash theme={null}
mysql://username:password@hostname:3306/database?ssl=true&sslrejectunauthorized=true
```

Check your provider's docs for the exact parameters they require.

## Providers

<Tabs>
  <Tab title="PlanetScale">
    Dashboard → database/branch → **Connect**. PlanetScale requires SSL.

    ```bash theme={null}
    mysql://username:password@aws.connect.psdb.cloud/your-database?sslaccept=strict
    ```
  </Tab>

  <Tab title="Railway">
    Project → MySQL service → **Connect** → **Database URL**.

    ```bash theme={null}
    mysql://root:password@monorail.proxy.rlwy.net:12345/railway
    ```
  </Tab>

  <Tab title="Local">
    ```bash theme={null}
    mysql://root:password@localhost:3306/mydb
    ```

    No password? Omit it:

    ```bash theme={null}
    mysql://root@localhost:3306/mydb
    ```
  </Tab>
</Tabs>

<Note>
  MySQL `SET` columns show as **Enums** in the Definitions view. Display only — your data and schema
  are unaffected.
</Note>

<Tip>
  **Test connection** before saving. If it fails, check host, port, credentials, and SSL parameters.
</Tip>
