Connections
Create, organize and share database connections, from the welcome window to connection URLs and groups.
A connection stores everything Mantidb needs to reach a database: the driver, the server address, your user name, an optional SSH tunnel and TLS settings. Each open connection gets its own workspace window.
The welcome window
The welcome window opens when Mantidb starts. Open it again at any time with ⌘N (File ▸ Connections…).
The left panel shows the app version and three buttons:
- Backup Database and Restore Database — menus that list your saved PostgreSQL and MySQL connections. Pick one to connect and open the backup or restore sheet.
- Create Connection — opens the connection form.
The right panel lists your saved connections. Each row shows an engine badge (Pg, My, Lt, Ms, Rd, Mg), the name, the tag in its status color, and a subtitle with host : database, SSH : <ssh host> or the SQLite file name.
- Double-click a row, or select it and press
↩, to connect. - Type in Search for connection… to filter by name, host, database, file path, SSH host or tag. Press
↩to connect to the first match. - The + menu has New Connection…, New Group… and Import from URL….
Right-click a connection for Connect, Edit…, Move to Group, Copy as URL and Delete.
Create a connection
Click Create Connection (or + ▸ New Connection…) to open the connection form. New connections start with the name New connection, the PostgreSQL driver, host 127.0.0.1 and user postgres.
When you're done, click Connect (↩) to open it right away, Save to keep it for later, or Cancel (Esc).
General fields
These fields appear for every driver:
| Field | Description |
|---|---|
| Name | The name shown in the welcome window and the sidebar. |
| Driver | PostgreSQL, MySQL / MariaDB, SQLite, SQL Server, Redis or MongoDB. Changing it sets the port to the driver's default, unless you entered a custom port. |
| Tag | Local, Development, Testing, Staging or Production. Changing it resets the status color to the tag's color. |
| Safe mode | Default for tag (the default), Silent, Confirm writes, Confirm + Touch ID for writes or Read only. See Safe Mode. |
| Status color | Five preset swatches, or Custom to pick any color. |
Server connections
For PostgreSQL, MySQL / MariaDB, SQL Server, Redis and MongoDB, the Server section has:
- Host and Port
- User and Password
- Database — labeled Database index for Redis and Default database for MongoDB.
Below it are the TLS and SSH Tunnel sections. See SSH & TLS.
SQLite files
For SQLite, the File section has a Path field and a Choose… button. Picking a file also names the connection after it.
Passwords are saved only in the macOS Keychain, never in Mantidb's own files.
Tags and status colors
The tag tells you, at a glance, which environment you're working on. Every tag except Local draws a thin stripe in the status color across the top of the workspace window.
| Tag | Default status color | Default safe mode |
|---|---|---|
| Local | Gray | Silent |
| Testing | Green | Silent |
| Development | Blue | Silent |
| Staging | Yellow | Silent |
| Production | Orchid (dark theme) / orange (light theme) | Confirm + Touch ID for writes |
You can change the default safe mode for each tag in Settings ▸ Safe Mode.
Connection URLs
Mantidb can create a connection from a URL and copy any connection back as one.
Import a URL
- Copy a URL and press
⌘Vin the welcome window, or - Choose + ▸ Import from URL… (the field is prefilled when the clipboard holds a valid URL).
The connection form opens with the imported settings, so you can review them before saving. Passwords in the URL go to the Keychain.
Supported schemes
| Driver | Schemes |
|---|---|
| PostgreSQL | postgres, postgresql, pgsql |
| CockroachDB | cockroachdb, cockroach (default port 26257) |
| Amazon Redshift | redshift (default port 5439) |
| MySQL / MariaDB | mysql, mariadb |
| SQL Server | sqlserver, mssql |
| Redis | redis, rediss (TLS required), valkey |
| MongoDB | mongodb |
| SQLite | sqlite, sqlite3 |
Add +ssh to the scheme to connect through an SSH tunnel (not for SQLite).
mongodb+srv://URLs aren't supported. Usemongodb://with one host of the cluster.
Examples
A plain connection, with a name and a tag:
postgres://user:password@host:5432/database?sslmode=require&name=Prod&env=production
Through an SSH tunnel (the same layout TablePlus uses):
postgres+ssh://sshuser:sshpass@bastion:22/user:password@10.0.0.5:5432/database?usePrivateKey=true&privateKey=~/.ssh/id_ed25519
With jump hosts (encode @ as %40 inside the jump value):
postgres+ssh://me@bastion/user@db:5432/app?jump=me%40edge:2222,ops%40inner
A SQLite file:
sqlite:///absolute/path/file.sqlite
Recognized parameters
| Parameter | Sets |
|---|---|
name | Connection name |
env, environment | Tag |
statusColor | Status color |
safeMode | Safe mode |
sslmode, ssl-mode, sslMode, ssl, tls | TLS mode |
sslrootcert, ssl-ca | CA certificate |
sslcert, ssl-cert | Client certificate |
sslkey, ssl-key | Client key |
sslservername | TLS server name |
usePrivateKey, privateKey, sshKey, identityFile | SSH private key |
jump, proxyJump | SSH jump hosts |
user, password, host, port, dbname, database | libpq-style connection fields |
TLS values can be disable (also disabled, false, 0, off), prefer (also allow, preferred), require (also required, true, 1, on), verify-ca and verify-full (also verify_identity). Other parameters are ignored.
Copy as URL
Right-click a connection and choose Copy as URL. The URL never includes passwords. CockroachDB and Redshift connections are copied as postgresql:// URLs.
Groups
Groups keep related connections together, for example by project or client.
- Create one with + ▸ New Group….
- Move a connection by dragging it onto a group header (or onto a connection in that group), or with Move to Group in its context menu.
- Click a group header to collapse or expand it. The header shows how many connections it holds.
- Right-click a header to Rename Group… or Delete Group. Deleting a group keeps its connections; they become ungrouped.
When you have groups, connections without one are listed under Ungrouped.
Groups can't be nested, and connections can't be reordered by hand.
Restore session
When you close a saved connection's window, or quit Mantidb, the open tabs are saved. The next time you open that connection, they come back:
- Table tabs, with their filters, sort, page, view (Data, Structure or Indexes) and hidden columns.
- Query tabs, with their text and any linked favorite or
.sqlfile. - The active tab and the current schema.
Tables that were dropped in the meantime are skipped. Linked .sql files are read again from disk, so unsaved edits to them are lost; Mantidb warns you when you close the window.
Sessions are saved only for saved connections, not for SQLite files you open directly. Windows don't reopen by themselves when Mantidb starts, and a split pane isn't restored.
Switching connections
Each open connection has its own window. The card at the top of the sidebar shows the current connection — its status dot, name, engine version, tag, SSH when tunneled, and the safe mode.
Click the card to:
- Jump to another window under Open connections.
- Choose Open Connection… to open another saved connection.
- Change the window's Safe Mode.
