Skip to main content
open "mysql://…" goes to whichever app claims the mysql:// scheme, and with another database client installed that may not be TablePro. Name TablePro instead, either by bundle identifier or through the tablepro command:
Any connection URL works, including its query parameters. TablePro uses a saved connection when one matches on type, host, port, database and user; otherwise the session is temporary and never written to disk. Running tablepro with no argument opens the app and nothing else.

Install the tablepro command

Open Settings > General, find Command Line, and click Install. It writes a small script at /usr/local/bin/tablepro whose whole body is exec open -b com.TablePro "$@".
Command Line install section in TablePro settingsCommand Line install section in TablePro settings

The Command Line section in Settings > General

That directory is root-owned on a stock macOS install, so expect an administrator password prompt. Cancel it and nothing is written. If the write fails anyway, Settings prints the exact sudo command to paste into Terminal; run it, switch back, and the status updates itself. Uninstall removes the script again. When something else already occupies that path, Install is dimmed and Settings says “A different file already exists at …”: remove that file first.

Open a file

Files route the same way, whether double-clicked in Finder or passed on the command line:
  • .sql, .psql and .pgsql open in a query tab on the current connection. A window already holding that file comes to front. With no connection open, the file waits until you connect.
  • Database files open a connection to the file itself and save nothing: .db, .db3, .s3db, .sl3, .sqlite, .sqlite3 and .sqlitedb open with SQLite, .duckdb and .ddb with the DuckDB plugin. A window already connected to that file comes to front instead of a second one opening.
The first time a link connects, TablePro asks: Open External Database Connection?, showing the host, user and database. This is what stops a web page from opening a connection behind your back. For a database on your own machine (localhost, 127.0.0.1, ::1, or any 127.x.x.x address) the alert adds Always Allow. Choose it and that database stops asking, which is what makes ddev tablepro a one-step command. Trust is keyed on database type, host, database name, user and the URL’s name parameter, not the port, so a tool that picks a new port on each start stays trusted.
Alert asking to confirm an external database link, with Always Allow for local databasesAlert asking to confirm an external database link, with Always Allow for local databases

The confirmation alert for an external database link

A link to a remote host asks every time. Only a database on this machine can be trusted.
Settings > General > Trusted Links lists what you have trusted, with Forget per entry and Forget All. Two things still prompt even on a trusted connection: a link carrying a filter (?query=, ?condition= or ?raw=) confirms the filter, and a connection with a pre-connect script shows the script.