# Connection basics (/docs/connect)

How Dora connects to a database, from connection strings to automatic engine and SSL detection, account integrations, and SSH tunnels.

Dora connects to any **PostgreSQL, MySQL, MariaDB, CockroachDB, SQL Server,
SQLite, DuckDB, libSQL, or Cloudflare D1** database, and to **Redis and Valkey** through the
[key-value studio](/docs/guides/key-value-studio). Almost every hosted provider gives you a standard
connection string, and Dora handles the rest.

## Paste a connection string [#paste-a-connection-string]

Open the connection dialog (`Mod+Shift+N`) and paste a URL into the search box.
Dora shows what it detected, and Enter continues to the details step, where you
can switch between **Fields** and **Connection string**. Dora reads the scheme
and host to figure out the rest:

| Scheme                          | Engine                                         |
| ------------------------------- | ---------------------------------------------- |
| `postgresql://` / `postgres://` | PostgreSQL (or CockroachDB / Yugabyte by host) |
| `ecto://`                       | PostgreSQL, as written by Elixir's Ecto        |
| `mysql://`                      | MySQL or MariaDB                               |
| `sqlserver://` / `mssql://`     | [SQL Server](/docs/connect/sql-server)         |
| `libsql://`                     | libSQL (Turso)                                 |
| `sqlite://`                     | SQLite                                         |
| `duckdb://`                     | DuckDB                                         |
| `d1://`                         | Cloudflare D1                                  |
| `posthog://`                    | PostHog (HogQL)                                |

## Automatic engine and SSL detection [#automatic-engine-and-ssl-detection]

Dora recognizes the major managed hosts by their hostname and applies the right
settings for you:

- **Engine**: for example a `*.planetscale.com` host is treated as MySQL, while
  `*.cockroachlabs.cloud` is treated as CockroachDB.
- **SSL**: managed providers that require TLS (Supabase, Neon, Vercel Postgres,
  Render, PlanetScale, and others) have SSL enabled automatically. An explicit
  `?sslmode=...` or `?ssl=...` in your URL always wins.
- **Port hints**: for hosts that serve more than one engine, the port helps:
  `26257` → CockroachDB, `3306` → MySQL, `5432` → PostgreSQL.

If you mistype a scheme (`postgrss://`), Dora suggests the closest valid one
instead of failing silently.

<Callout type='info'>
	You can always override detection. The **Require SSL** switch and the source you pick in the
	dialog take precedence over what Dora guesses.
</Callout>

## Connect from a provider account [#connect-from-a-provider-account]

For some providers you can skip copying strings entirely. Dora has account
integrations for **Supabase, Neon, Vercel, PlanetScale, Xata, Cloudflare D1,
PostHog, and Turso**: sign in once, and Dora lists your projects/databases and builds the
connection for you. Look for the **Connect with…** option in the connection
dialog. The provider-specific pages note where this is available.

## SSH tunnels [#ssh-tunnels]

To reach a PostgreSQL, CockroachDB, MySQL, MariaDB, or SQL Server database on a private
network, enable **SSH tunnel** in the connection dialog and provide:

- SSH host, port (default `22`), and username,
- an authentication method: **key file** or **password**. On macOS and Linux
  Dora falls back to your SSH agent if neither is given,
- optionally the **host key fingerprint** (`SHA256:…`), so Dora refuses a server
  whose key does not match.

Dora opens the tunnel before connecting and tears it down on disconnect. Your
database host and port stay as they are on the private network. Dora forwards
them locally for you.

## Pooled vs direct connections [#pooled-vs-direct-connections]

Several Postgres hosts (Supabase, Neon, and others) offer a **connection pooler**
on a different port or hostname. Poolers are great for short-lived queries; use a
**direct** connection if you need features the pooler does not support (such as
some session-level settings). Each provider page calls out which string to use.
