Databases
The Bridge can broker access to seven database systems: MySQL, PostgreSQL, CockroachDB, SQL Server (MSSQL), Redis, MongoDB, and Cassandra. In every case the user reaches the database through a brokered, recorded session and never holds the real database credentials.
Each database can be offered two ways, and you can use either or both:
- Native mode - users point their normal database tool at a port on the Bridge. That can be a command-line client (
mysql,psql,redis-cli,mongosh, and so on) or a graphical tool (DBeaver, TablePlus, MySQL Workbench, etc.). To the tool it looks like an ordinary database connection; the Bridge stands in the middle. - Browser mode - users run queries in a built-in query window inside the Bridge web interface, with nothing to install.
Jump to an engine: MySQL · PostgreSQL · CockroachDB · SQL Server · Redis · MongoDB · Cassandra
Granting access. Settings here enable database protocols for the deployment. To grant a person access to a database, create a checkout - see the database checkout options and a worked example.
The in-browser SQL client (auto-enabled)
There is no separate switch for the in-browser query window. It turns on automatically as soon as any database protocol has browser mode enabled. For example, enabling browser mode for PostgreSQL alone makes the in-browser SQL client available for it; adding MySQL browser mode extends the same client to MySQL too.
postgres:
browser:
enabled: true # this alone activates the in-browser SQL clientHow native mode works
Pick a port for the Bridge to listen on, then have users point their client at the Bridge instead of the real database. The default ports below match each database’s conventional port, so existing tools usually need only the address changed.
# MySQL example - connect the normal client to the Bridge
mysql -h bridge.example.com -P 3306 -u 'alice%mysql-primary.internal' -pFor native database clients, Bridge routes the session from the database username. Use
<bridge-user>%<target-host> as the username so Bridge can match the checkout and
connect to the approved target.
Each database
MySQL
mysql:
idle_timeout: 30m
native:
enabled: true
listen: "3306"
browser:
enabled: truePostgreSQL
postgres:
idle_timeout: 30m
native:
enabled: true
listen: "5432"
browser:
enabled: trueCockroachDB
CockroachDB speaks the PostgreSQL wire protocol but has its own conventional port.
cockroachdb:
idle_timeout: 30m
native:
enabled: true
listen: "26257"
browser:
enabled: trueSQL Server (MSSQL)
mssql:
idle_timeout: 30m
native:
enabled: true
listen: "1433"
browser:
enabled: trueRedis
redis:
idle_timeout: 30m
native:
enabled: true
listen: "6379"
browser:
enabled: trueMongoDB
mongodb:
idle_timeout: 30m
native:
enabled: true
listen: "27017"
browser:
enabled: trueCassandra
cassandra:
idle_timeout: 30m
native:
enabled: true
listen: "9042"
browser:
enabled: trueMixing modes
You can enable native for some databases and browser for others, or both for the same database. This example offers PostgreSQL through users’ own tools, MySQL through the browser, and Redis through both.
postgres:
native:
enabled: true
listen: "5432"
mysql:
browser:
enabled: true
redis:
native:
enabled: true
listen: "6379"
browser:
enabled: trueOption reference
Each database protocol exposes the same three-part structure. The default native port differs per database.
| Option | Type | Default | Description |
|---|---|---|---|
mysql.idle_timeout | duration | 30m | Close a session after this much inactivity. |
mysql.native.enabled | bool | false | Turn on native MySQL (a listening port). |
mysql.native.listen | string (port) | 3306 | Port the Bridge listens on. Required when native is enabled. |
mysql.browser.enabled | bool | false | Turn on the in-browser SQL client for MySQL. |
postgres.idle_timeout | duration | 30m | Close a session after this much inactivity. |
postgres.native.enabled | bool | false | Turn on native PostgreSQL. |
postgres.native.listen | string (port) | 5432 | Port the Bridge listens on. Required when native is enabled. |
postgres.browser.enabled | bool | false | Turn on the in-browser SQL client for PostgreSQL. |
cockroachdb.idle_timeout | duration | 30m | Close a session after this much inactivity. |
cockroachdb.native.enabled | bool | false | Turn on native CockroachDB. |
cockroachdb.native.listen | string (port) | 26257 | Port the Bridge listens on. Required when native is enabled. |
cockroachdb.browser.enabled | bool | false | Turn on the in-browser SQL client for CockroachDB. |
mssql.idle_timeout | duration | 30m | Close a session after this much inactivity. |
mssql.native.enabled | bool | false | Turn on native SQL Server. |
mssql.native.listen | string (port) | 1433 | Port the Bridge listens on. Required when native is enabled. |
mssql.browser.enabled | bool | false | Turn on the in-browser SQL client for SQL Server. |
redis.idle_timeout | duration | 30m | Close a session after this much inactivity. |
redis.native.enabled | bool | false | Turn on native Redis. |
redis.native.listen | string (port) | 6379 | Port the Bridge listens on. Required when native is enabled. |
redis.browser.enabled | bool | false | Turn on the in-browser client for Redis. |
mongodb.idle_timeout | duration | 30m | Close a session after this much inactivity. |
mongodb.native.enabled | bool | false | Turn on native MongoDB. |
mongodb.native.listen | string (port) | 27017 | Port the Bridge listens on. Required when native is enabled. |
mongodb.browser.enabled | bool | false | Turn on the in-browser client for MongoDB. |
cassandra.idle_timeout | duration | 30m | Close a session after this much inactivity. |
cassandra.native.enabled | bool | false | Turn on native Cassandra. |
cassandra.native.listen | string (port) | 9042 | Port the Bridge listens on. Required when native is enabled. |
cassandra.browser.enabled | bool | false | Turn on the in-browser client for Cassandra. |