Skip to content

ezgh databases connect

Open a local port to a database, from anywhere.

Updated View as Markdown
ezgh databases connect <database> [flags]

Open a local port to a database from anywhere you can run ezgh, with nothing in its VPC. Each connection to the port opens its own session to the database, so clients and pools that open several connections work. The engine’s TLS runs from your client to the database, and the engine still checks its user and password. Sessions need databases.databases.connect; the database’s allowed sources don’t apply to them.

It prints what ezgh databases connection does, with the client command rewritten for the local port, and listens until interrupted (Ctrl-C). A connection ends when the database fails over, after 30 minutes without activity, or after 8 hours: ezgh says why and keeps listening.

Part of ezgh databases.

Flags

Flag Type Default Description
--address string 127.0.0.1 local address to listen on; anyone who can reach another address reaches the database through your access
--port int local port to listen on (default: the database’s port)

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close