PostgreSQL and MySQL from your iPhone, through your Mac
Your development database runs on the Mac, in Docker, or on a server the Mac can reach. Look inside it from the phone without opening its port to the world or building a tunnel from the phone.
ShiftStage does not connect the phone to the database. The Mac agent does, with its own
implementation of the PostgreSQL and MySQL wire protocols, and the phone sees only the
answers. Whatever the Mac reaches — 127.0.0.1:5432, a container's published
port, db.example.com — the phone can read.
Other ways, and when they are better
psqlormysqlover SSH. If you already reach the Mac or the database host by SSH, the command-line client is complete and costs nothing. It is the right tool for administration, and for dumps withpg_dump.- A database client app on the iPhone. If the server is reachable from the internet, or you already run an SSH tunnel to it, a native client connects directly — the better choice when you need schema editing or other administration ShiftStage does not do.
- ShiftStage is for the database next to your code: on
localhost, in Docker, or reachable only from the Mac's network.
Add the connection on the Mac
In the agent's settings, open Workspaces → Databases and choose "Add a connection…": name, engine (PostgreSQL or MySQL; MariaDB is reached as MySQL), host, port, database, user, password. The password goes into the Mac's keychain and is never sent to any device. Records are created only on the Mac — deciding where the agent goes with your credentials is a privilege of the person at the Mac, not of a phone.
The settings offer drafts from ports 5432 and 3306 listening on
the Mac and from postgres:// and mysql:// URLs in your projects'
.env files. Drafts stay on the Mac until you save one.
"Test" connects, names the server version and warns if the role is a superuser: for a remote database, give the record a role that can only read.
Encryption: none (the default only for loopback), TLS without verification, or TLS with verification, optionally against your own root certificate. A server that refuses required TLS is an error, never a silent fallback.
Sign-in is by password only — no client certificates, no built-in SSH tunnel, no Unix socket. If the server needs a tunnel, open it in the terminal and point the record at the local end.
Read from the phone
The screens are the same as for a SQLite file: tables grouped by schema (system schemas
hidden), rows in pages, sort, filters, search across all columns, list or grid, and a query
editor that suggests table and column names. numeric values arrive as the
server wrote them, so no cents are lost to floating point.
Reading cannot write. One statement per query; it must start with SELECT,
WITH, TABLE, VALUES, SHOW or
EXPLAIN (and DESCRIBE on MySQL); every query runs in a read-only
transaction that is rolled back; the session itself defaults to read-only as a second line.
COPY … TO PROGRAM and INTO OUTFILE are refused. Statements time
out on the server and are cancelled; the connection gives up after 10 seconds. Results
export as CSV, to the Mac's Downloads or through the share sheet.
Change rows on a copy you own
INSERT, UPDATE, DELETE (and MERGE on
PostgreSQL, REPLACE on MySQL) are possible behind three locks:
- "Change databases from devices" in the agent's Security settings — off by default;
- "Allow changes" on that one connection — off by default, so a production database you added for reading does not become writable along with your local copy;
- a confirmation at the Run button on the phone, showing the statement and the database name.
Schema changes and administration are refused. The answer is the command and the number of rows; retrying after a dropped connection does not run the statement twice.
What is recorded
Every request lands in the Mac's access log with the connection name and the table or statement; changes to connection records land in its security log. Row values are never logged and never saved on the phone. Redis is not supported.
Set it up once
- Install the agent on the Mac. A signed, notarised app from our open
Homebrew tap. It shares only the folders you name.
brew install --cask shiftstage/shiftstage/shiftstage-agent - Install the app on the iPhone from the App Store.
- Pair them. Scan the code on the Mac's screen and confirm the same symbols on both devices. No account. The first pairing needs both on the same network.
That is the whole setup: no VPN, no port forwarding, no SSH keys. On the same Wi-Fi the phone talks to the Mac directly; away from home the connection goes peer to peer, or through a relay that forwards only end-to-end encrypted bytes. The Mac has to be awake: a sleeping Mac answers nothing, and the app says so instead of timing out.
For a SQLite file in your project, see
view a SQLite database from your iPhone;
for the tunnel or a one-off psql, the
Mac terminal from your iPhone.
Get it
The Mac agent: download page — one Homebrew command or a notarised disk image. The iPhone app: App Store. Free forever for one Mac on your own network, no account; $7.99 a month or $69.99 a year to reach it from anywhere.
More guides: all guides.