Help › Connect to databases

Connect to CockroachDB, TiDB and other compatible databases

Databases that speak PostgreSQL's, MySQL's or SQL Server's protocol: how to connect, how Querlyn recognizes each, and what differs.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

Many databases speak the protocol of PostgreSQL, MySQL or SQL Server. Querlyn connects to them as it connects to that engine, recognizes which database answered, and changes what it offers where the database differs.

ProtocolDatabases
PostgreSQLCockroachDB, YugabyteDB, TimescaleDB, and the hosted services Neon, Supabase, AlloyDB and Aurora PostgreSQL
MySQLTiDB, SingleStore, and the hosted services Aurora MySQL and PlanetScale
SQL ServerAzure SQL Database

Add a connection

  1. Choose File › New Connection….
  2. Open the Database engine list and choose the database. It is listed right under the engine whose protocol it speaks, with that protocol beside its name; typing its name finds it. Port changes to its usual port while you have not typed one, and Host and Database show examples for it.
  3. Fill in the rest as for the engine: see Connect to PostgreSQL, Connect to MySQL or MariaDB or Connect to SQL Server.
  4. Choose Test Connection, then Save & Connect.
DatabaseUsual portDatabase when none is given
CockroachDB26257defaultdb
YugabyteDB5433yugabyte
Neon5432neondb
Supabase5432postgres
TiDB4000none
The othersThe engine'sThe engine's

A pasted URL chooses the database too. The schemes cockroachdb://, tidb://, singlestore:// and jdbc:yugabytedb:// name it, and so does the host of a hosted service, for example ….cockroachlabs.cloud, ….tidbcloud.com, ….neon.tech, ….supabase.co, ….psdb.cloud, an Aurora cluster endpoint (….cluster-….rds.amazonaws.com) or an Azure SQL Database server (….database.windows.net). See Paste a connection URL. Connections imported from DBeaver, DataGrip, TablePlus or Docker Compose keep the database they were for; see Import connections.

How Querlyn recognizes the server

When a connection opens, Querlyn asks the server what it is. The answer decides what Querlyn offers; the database you chose under Database engine only names the connection until it connects. If the two differ, the details under Test Connection say so, for example "The server is PostgreSQL 17.4; the connection is saved as CockroachDB."

DatabaseWhat it is recognized by
CockroachDBIts version text
YugabyteDBIts version text, which also gives the PostgreSQL version it is built on
TimescaleDBThe timescaledb extension in the database
Neon, Supabase, AlloyDB, Aurora PostgreSQLTheir own settings, roles and functions
TiDBIts version text
SingleStore, Aurora MySQL, PlanetScaleTheir own server variables
Azure SQL DatabaseThe server's engine edition

The name of the server you connected to is shown in three places: the result of Test Connection ("Connected: CockroachDB 25.2.24 (PostgreSQL protocol)"), the connection's line in the sidebar and its tooltip, and the status bar of a tab on the connection ("CockroachDB (PostgreSQL)", the database and the SQL dialect Querlyn reads it in).

CockroachDB

Browsing, completion, queries, transactions, editing rows, dry runs, Explain and Explain Analyze, Server Activity, importing data and copying tables work. What differs:

  • Transactions run at SERIALIZABLE isolation. When one conflicts with another, CockroachDB rolls it back with error 40001 and asks for it to be run again; the error says so. Querlyn does not run it again for you.
  • Schema changes run online, as background jobs: other sessions keep reading and writing the table. There are no lock warnings; the editor marks a schema change with a note that says this. A schema change made inside a transaction runs after COMMIT, so Querlyn treats schema changes as committing at once.
  • Plans are CockroachDB's own: steps with their estimated and actual rows, the table and index each reads, a warning on a full scan, and CockroachDB's index recommendations.
  • Server Activity lists the sessions of every node. Cancel Query and Terminate Session send CANCEL QUERY and CANCEL SESSION. A login sees only its own sessions unless it is an admin or has the VIEWACTIVITY privilege; cancelling other logins' queries needs CANCELQUERY.
  • Not available: backup and restore (pg_dump does not work with CockroachDB; use its BACKUP and RESTORE statements), the "blocking others" notice, table sizes, and the Users and Roles tab (CockroachDB keeps privileges outside the PostgreSQL catalog columns Querlyn reads; SHOW ROLES and SHOW GRANTS list them). Triggers are listed but Show Definition does not open them.
  • Importing data uses INSERT statements rather than COPY.

YugabyteDB

YugabyteDB's YSQL is PostgreSQL's own query layer, so nearly everything works as on PostgreSQL. What differs:

  • Schema changes are not undone by a rollback: a CREATE TABLE inside a transaction stays when it is rolled back. Querlyn treats schema changes as committing at once.
  • No lock warnings: PostgreSQL's rules do not describe YugabyteDB.
  • Users, roles and privileges work as on PostgreSQL; see Manage users, roles and privileges.
  • Not available: backup and restore (Querlyn's pg_dump leaves out how tables are split into tablets; use ysql_dump, which comes with YugabyteDB), and the "blocking others" notice.

TimescaleDB

TimescaleDB is PostgreSQL with an extension, so everything that works on PostgreSQL works. TimescaleDB's own schemas (_timescaledb_internal, which holds the chunks, timescaledb_information and the others) are listed with the system schemas, after yours. A hypertable shows, under its Properties, how many chunks it has, the column it is partitioned by and its interval, and whether compression is on.

Note: A restore into a database with TimescaleDB needs TimescaleDB's timescaledb_pre_restore() before it and timescaledb_post_restore() after it. Querlyn's restore does not run them; run them yourself.

Neon, Supabase, AlloyDB and Aurora PostgreSQL

These run PostgreSQL itself, so everything that works on PostgreSQL works, and Querlyn names the service ("PostgreSQL 17.4 on Neon"). A few things to know:

  • They need TLS. Verify full, the default for a server that is not on your computer, is right.
  • Neon starts a compute that has scaled to zero when you connect, so the first connection can take a few seconds.
  • Supabase's connection pooler in transaction mode (port 6543) does not keep a session between statements: temporary tables, SET and a transaction left open between runs need the direct or session connection (port 5432).
  • Aurora PostgreSQL accepts AWS IAM sign-in; see Sign in with AWS or Entra ID.

TiDB

Browsing, completion, queries, transactions, dry runs, editing rows, Explain and Explain Analyze, Server Activity and the "blocking others" notice work. What differs:

  • No stored procedures, functions or triggers: TiDB has none.
  • Plans are TiDB's own: each operator with its estimated and actual rows, where it runs (TiDB or TiKV), and what it took. A table without statistics is pointed out.
  • Server Activity lists the sessions of every TiDB server of the cluster; Cancel Query sends KILL QUERY.
  • Schema changes run online, as DDL jobs. There are no lock warnings; the editor marks a schema change with a note that says this.
  • Read-only connections rely on Querlyn's own check: TiDB refuses to make a session read-only.
  • Users, roles and privileges work as on MySQL 8; see Manage users, roles and privileges. TiDB has no connection limit per account.
  • Not available: backup and restore (mysqldump fails on TiDB; use TiDB's Dumpling or BR).

SingleStore

SingleStore speaks MySQL's protocol. Querlyn has not been run against a SingleStore server, so what could not be checked is off rather than guessed: dry runs (SingleStore has no savepoints), Explain, backup and restore (use SingleStore's BACKUP DATABASE), lock warnings, the "blocking others" notice, the lock and statement time limits, and the Users and Roles tab (SingleStore keeps its users and roles in tables of its own). Browsing, queries, transactions, editing rows and Server Activity are offered.

Aurora MySQL and PlanetScale

These run MySQL itself, so everything that works on MySQL works, and Querlyn names the service ("MySQL 8.0.39 on Aurora MySQL 3.08.0"). Both need TLS; keep Verify full. PlanetScale has no MySQL accounts (its passwords and roles are made in its dashboard), so it has no Users and Roles tab. Aurora MySQL accepts AWS IAM sign-in; see Sign in with AWS or Entra ID.

Azure SQL Database

Azure SQL Database runs SQL Server's engine as a service. What differs:

  • A session stays in its database: Azure SQL Database has no USE. A tab on another database of the server gets a session of its own, opened in that database, as on PostgreSQL. See Choose a tab's connection and database.
  • Not available: backup and restore. Azure backs the database up itself; for a copy, export a BACPAC file from the Azure portal or with SqlPackage.
  • Not available: the Users and Roles tab. Azure SQL Database keeps its logins in the master database and gives most users passwords of their own (contained users); run CREATE USER, ALTER ROLE and GRANT in a query tab.
  • Microsoft Entra ID sign-in works; see Sign in with AWS or Entra ID.

An Azure SQL Managed Instance is SQL Server as far as Querlyn is concerned: USE and backups work there.

Versions Querlyn was checked against

DatabaseVersion
CockroachDB25.2
YugabyteDB2026.1
TimescaleDB2.30 on PostgreSQL 17
TiDB8.5

SingleStore and the hosted services (Neon, Supabase, AlloyDB, Aurora, PlanetScale, Azure SQL Database) have not been checked against a server: what Querlyn does there follows their documentation.

Help for Querlyn 0.1.0. All help topics