Skip to content

Quickstart

This guide walks you through registering a MySQL database, provisioning a ReflexDB instance, creating an API key, and running your first query.

  1. Create an account

    Sign up at app.reflexdb.cloud. Accept the Terms of Service on first login.

  2. Register a database

    From the dashboard, click New Connection, then New Database and fill in your MySQL connection details:

    FieldDescription
    HostHostname or IP of your database server
    PortDefault 3306 (MySQL), 5432 (PostgreSQL), 1433 (SQL Server)
    DatabaseThe database name to replicate
    UserDatabase user (needs SELECT privilege; CDC modes require additional grants — see below)
    PasswordStored encrypted at rest — never written to the database
    Sync modeCDC mode (recommended) or poll for periodic full reload
  3. Upload a schema config (optional)

    By default, ReflexDB includes all tables. To include only specific tables or columns, upload a reflexdb.yaml:

    version: 1
    tables:
    - name: users
    columns: [id, name, email, created_at]
    - name: posts
    columns: [id, user_id, title, body, published_at]
    relations:
    include: [author]

    See the Schema Config reference for the full format.

  4. Provision an instance

    Click Provision on the database card. ReflexDB will:

    • Compile a query engine for your schema (~3–5 min)
    • Deploy a dedicated instance and register a <id>.reflexdb.cloud subdomain with TLS

    The status progresses: registered → building → deploying → running.

  5. Create an API key

    Once the instance is running, open the API Keys tab and click New Key. Copy the key — it’s shown only once.

    rxk_a1b2c3.aBcDeFgHiJkLmNoPqRsTuVwXyZ...
  6. Make your first query

    Send a POST /query request to your instance endpoint:

    Terminal window
    curl https://<instance-id>.reflexdb.cloud/query \
    -H "Authorization: Bearer rxk_a1b2c3.aBcDeFgHiJkLmNoPqRsTuVwXyZ..." \
    -d 'users { id name email }'

    Response:

    {
    "data": [
    { "id": 1, "name": "Alice", "email": "alice@example.com" },
    { "id": 2, "name": "Bob", "email": "bob@example.com" }
    ],
    "meta": {
    "table": "users",
    "query": { "fields": ["id", "name", "email"] },
    "pagination": { "count": 2, "total_matched": 2, "has_more": false },
    "timing_ms": 0.42
    }
    }

If your MySQL server is not publicly accessible (e.g. in a private VPC or behind a firewall), ReflexDB can connect through an SSH bastion host.

When registering a connection, expand the SSH tunnel section and fill in:

FieldDescription
Bastion hostHostname or IP of your SSH jump host
Bastion portDefault 22
SSH userUsername on the bastion host
Private keyRSA, Ed25519, or ECDSA key in OpenSSH format

ReflexDB stores the private key encrypted at rest. The tunnel is established before each MySQL connection attempt — your database host and port are resolved from inside the bastion.

  • Format: OpenSSH PEM (generated with ssh-keygen -t ed25519 or ssh-keygen -t rsa -b 4096)
  • Passphrase: not supported — generate without a passphrase or strip it with ssh-keygen -p
  • Permissions: the bastion user must be able to open a TCP connection to the MySQL host on port 3306

Use Test Connection on the connection card to verify the tunnel and MySQL credentials before provisioning. The test runs against your live database and reports any connection or authentication errors.

For troubleshooting, see the SSH tunnel runbook.