Connections

Connecting to a database

Every field of the connection dialog, the URL formats it understands, SSH tunnels and TLS.

Open the connection dialog with New Connection… from the explorer's + menu, the connection menu in the title bar, or Go to anything. To change an existing connection, right-click it → Edit…. Delete… in the same menu removes it, together with its saved passwords.

The New Connection dialog
The New Connection dialog

The dialog has three tabs: General, SSH and Options. Its buttons are Test Connection, Cancel and Save.

#General

FieldWhat to enter
PasteAny connection string. Click Parse to fill in the rest of the form from it.
NameOptional. Shown in the explorer and on tabs; defaults to something built from the host and database.
TypeThe database: PostgreSQL, MySQL, SQLite, MongoDB, Redis, Other (JDBC driver)…
Connect byHost and port (or File for file databases), or a raw JDBC URL (Connection string for MongoDB).
Host, PortThe server. Several hosts can be listed as host1:port1,host2:port2.
DatabaseThe database to open. For MongoDB it is optional: the database opened first, and the default auth source.
User, PasswordCredentials. The password is saved in the system keychain.
FileFor SQLite, DuckDB, H2 and data files: the file on disk (Browse…).

#Paste a connection URL

Paste any of these into Paste and press Parse:

FormExample
libpq URI or keyword/valuepostgresql://user:pass@h1:5432,h2:5433/app?sslmode=require · host=db port=5432 dbname='my db'
pgjdbcjdbc:postgresql://[::1]:5740/accounting?currentSchema=app
MySQL / MariaDBmysql://user:pass@host/db?ssl-mode=REQUIRED · jdbc:mariadb://host/db?sslMode=verify-full
Advanced Connector/J, MariaDBjdbc:mysql:replication://…, address=(host=…)(port=…), kept as a raw JDBC URL
SQLitejdbc:sqlite:/path/app.db · sqlite:///path/app.db · ~/data/app.sqlite3
SQL Server, ClickHouse, DuckDB, H2, HSQLDB, Derbyjdbc:sqlserver://db:1433;databaseName=shop · jdbc:clickhouse://ch:8123/default · jdbc:duckdb:/data/a.duckdb
Redis, Valkeyredis://:pass@cache:6379 · rediss:// (TLS) · valkey://host
MongoDBmongodb://user@host:27017/shop?authSource=admin · mongodb+srv://user@cluster0.example.net/shop
Data files~/exports/orders.csv, report.xlsx, events.ndjson
Any other JDBC driverjdbc:firebirdsql://…, jdbc:oracle:thin:@… becomes Other (JDBC driver); then choose the driver's jar

libpq parameters are translated to their pgjdbc names (application_name → ApplicationName, connect_timeout → connectTimeout, target_session_attrs → targetServerType, ssl=true → sslmode=require).

Passwords found in a pasted string go straight to the keychain, never into the saved profile.

#Redis, etcd and friends

  • Redis, Valkey, KeyDB, Dragonfly: host and port in the form. For a cluster or Sentinel, add the driver properties mode=cluster, or mode=sentinel plus sentinelMaster=…. Add ssl=true for TLS.
  • etcd: host and port (2379 by default); user and password if auth is on; ssl=true for HTTPS. etcd support is built in, so there is nothing to download.

#SSH

Turn on Connect through an SSH tunnel to reach a database that only listens inside a private network. The tab title shows a check mark (SSH ✓) while the tunnel is on.

FieldWhat to enter
From configPick a Host from ~/.ssh/config. Follows Include and Host * defaults, and fills in the fields below.
Host, PortThe SSH server (the "jump" or "bastion" host).
UserYour SSH user.
AuthKey pair or Password.
Key file, PassphraseLeave Key file empty to use your default keys in ~/.ssh. The passphrase goes to the keychain.

The Host on the General tab is then resolved from the SSH server, so localhost means the database on the SSH host itself. SSH host keys you accept are remembered in ~/.tablegrip/known_hosts.

#Options

OptionEffect
EnvironmentNone, Local, Development, Staging or Production. Colours the connection everywhere; Production also turns on confirmations.
GroupThe explorer folder this connection sits in, e.g. a project or client.
Read-onlyRefuse statements that change data or schema, before they reach the server.
Confirm before running statements that change data or schemaAsk before every write. Turned on automatically for Production.
AI agentsWhat the AI agent may see for this connection, or Use default.
Driver propertiesExtra settings passed to the driver, one key=value per line.

See Safety & environments for what each safety option does.

#TLS / SSL

There is no separate TLS tab: TLS is set with the driver's own properties, under Options → Driver properties or as URL parameters. Some common ones:

DatabaseProperty
PostgreSQLsslmode=require (or verify-full)
MySQL / MariaDBsslMode=verify-full (MariaDB Connector/J)
SQL Serverencrypt=true
Redis, etcdssl=true

Hosted presets set this for you: Neon and Supabase use sslmode=require, the hosted MySQL presets verify the server's certificate, and Azure SQL comes with encryption on.

#Testing and connecting

Test Connection opens a connection with the current settings and reports success or the server's error, without saving anything. If the driver isn't installed yet, it offers to download it first; see Drivers.

After saving, click the connection in the explorer to connect. MySQL and MariaDB connections get a 10-second connect timeout where the driver would otherwise wait forever.