Safe Mode
Protect important databases by confirming, authenticating or blocking every write before it runs.
Safe mode decides what happens before Mantidb writes to a database. It applies to everything that changes data or structure: grid edits, queries you run, structure changes, imports and more. Each connection has its own safe mode, which by default comes from its tag.
The four modes
| Mode | What happens before a write |
|---|---|
| Silent | Runs it right away. |
| Confirm writes | Shows a confirmation sheet with the SQL. |
| Confirm + Touch ID for writes | Shows the confirmation sheet, then asks for Touch ID or your Mac account password. |
| Read only | Rejects it. |
Reads, such as SELECT queries and browsing tables, are never interrupted.
Defaults by tag
New connections use Default for tag, so their safe mode follows the tag:
| Tag | Default safe mode |
|---|---|
| Local | Silent |
| Development | Silent |
| Testing | Silent |
| Staging | Silent |
| Production | Confirm + Touch ID for writes |
To give one connection a different mode, choose it in the Safe mode field of the connection form. A connection's own setting always wins over the tag default.
How writes are detected
Mantidb is conservative: a statement counts as a read only when it's clearly one. These count as reads:
SELECT,SHOW,VALUES,TABLE,DESCRIBEandDESC— unless they containINTOorFOR UPDATE.EXPLAINwithoutANALYZE.WITHqueries that contain no write keywords.PRAGMAwithout=.
Everything else counts as a write, including any statement Mantidb doesn't recognize. SELECT pg_terminate_backend(…) and SELECT pg_cancel_backend(…) also count as writes, because they affect other sessions.
The confirmation sheet
In Confirm writes and Confirm + Touch ID for writes, Mantidb shows a sheet before running anything:
- The title reads Run N statement(s) on <connection>?
- The subtitle shows the tag and safe mode, and explains how the SQL runs: in a single transaction, or one by one stopping at the first error.
- Below is the exact SQL, in a scrollable preview.
Review the SQL, then confirm to run it or cancel to go back. For Production connections the sheet uses a critical alert style, so it stands out.
Change it per window
You can change the safe mode of an open window without editing the connection:
- Click the connection card at the top of the sidebar.
- Choose a mode from the Safe Mode picker.
The change applies to that window. The Redis and MongoDB browsers have the same picker in their header card.
Always-confirm actions
Some actions are risky enough that Mantidb always asks before running them — even in Silent mode. In Read only they're blocked.
- Truncate… and Delete… a table. On Production they also ask for Touch ID. See Table actions.
- Kill Session in the Process List.
- Role changes in Users & Roles.
- Restoring a backup.
- Writes made by the AI assistant, the MCP server and plugins.
Settings ▸ Safe Mode
Open Mantidb ▸ Settings… (⌘,) and choose the Safe Mode tab to change the default for each tag. There's one picker per tag — Local, Development, Testing, Staging and Production — with the four modes. Click Restore Defaults to go back to the original settings.
These defaults apply to connections set to Default for tag. New windows pick up the change; windows that are already open keep their current mode.
On the iOS app, the Mac's Settings defaults aren't used: Production connections use Confirm + Face ID for writes, and the other tags use Silent.
