How to connect to a database from outside the cluster
Last updated: February 10, 2026
By default, databases in your Porter cluster are only accessible from inside the cluster for security reasons. However, you can use the porter datastore connect command to create a local proxy connection to the database from your machine.
To connect to a database from outside the cluster:
Run the
porter datastore connectcommand, providing the name of the database you want to connect to:porter datastore connect <database-name>The command will output a local connection URL, username, and password that you can use to connect to the database from your machine.
Use the provided connection details to connect to the database from your GUI application (e.g., TablePlus) or programming environment.
For example, if you run porter datastore connect my-dev-db, the output may look like:
Connection URL: localhost:63306
Username: root
Password: abc123
You can then use these details to build a connection string and connect to the database from your local GUI application or code.
For more information on using the porter datastore connect command, refer to the documentation.