forked from gravitational/teleport
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MongoDB guide, MySQL Cloud SQL guide and other 7.0 docs updates (g…
- Loading branch information
Showing
32 changed files
with
1,098 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,52 @@ | ||
--- | ||
title: Database Access Guides | ||
description: Guides for configuring Teleport Database Access with self-hosted or AWS RDS/Aurora PostgreSQL and MySQL | ||
description: Guides for configuring Teleport Database Access with self-hosted or cloud-hosted databases. | ||
layout: tocless-doc | ||
--- | ||
|
||
- [AWS RDS/Aurora PostgreSQL](./guides/postgres-aws.mdx) | ||
- [AWS RDS/Aurora MySQL](./guides/mysql-aws.mdx) | ||
- [AWS Redshift PostgreSQL](./guides/postgres-redshift.mdx) | ||
- [GCP Cloud SQL PostgreSQL](./guides/postgres-cloudsql.mdx) | ||
- [Self-hosted PostgreSQL](./guides/postgres-self-hosted.mdx) | ||
- [Self-hosted MySQL](./guides/mysql-self-hosted.mdx) | ||
- [GUI clients](./guides/gui-clients.mdx) | ||
# Database Access Guides | ||
|
||
## Cloud-hosted guides | ||
|
||
<TileSet> | ||
<Tile icon="cloud" title="AWS RDS PostgreSQL" href="./guides/postgres-aws.mdx"> | ||
Connect AWS RDS or Aurora PostgreSQL database. | ||
</Tile> | ||
<Tile icon="cloud" title="AWS RDS MySQL" href="./guides/mysql-aws.mdx"> | ||
Connect AWS RDS or Aurora MySQL database. | ||
</Tile> | ||
<Tile icon="cloud" title="AWS Redshift" href="./guides/postgres-redshift.mdx"> | ||
Connect AWS Redshift database. | ||
</Tile> | ||
<Tile icon="cloud" title="GCP Cloud SQL PostgreSQL" href="./guides/postgres-cloudsql.mdx"> | ||
Connect GCP Cloud SQL PostgreSQL database. | ||
</Tile> | ||
<Tile icon="cloud" title="GCP Cloud SQL MySQL" href="./guides/mysql-cloudsql.mdx"> | ||
Connect GCP Cloud SQL MySQL database. | ||
</Tile> | ||
</TileSet> | ||
|
||
## Self-hosted guides | ||
|
||
<TileSet> | ||
<Tile icon="database" title="Self-hosted PostgreSQL" href="./guides/postgres-self-hosted.mdx"> | ||
Connect self-hosted PostgreSQL database. | ||
</Tile> | ||
<Tile icon="database" title="Self-hosted MySQL" href="./guides/mysql-self-hosted.mdx"> | ||
Connect self-hosted MySQL database. | ||
</Tile> | ||
<Tile icon="database" title="Self-hosted MongoDB" href="./guides/mongodb-self-hosted.mdx"> | ||
Connect self-hosted MongoDB database. | ||
</Tile> | ||
</TileSet> | ||
|
||
## General guides | ||
|
||
<TileSet> | ||
<Tile icon="window" title="GUI clients" href="./guides/gui-clients.mdx"> | ||
Configure database graphical clients. | ||
</Tile> | ||
<Tile icon="integrations" title="High Availability" href="./guides/ha.mdx"> | ||
Deploy database access in HA configuration. | ||
</Tile> | ||
</TileSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,84 @@ | ||
--- | ||
title: Database Access GUI Clients | ||
description: How to configure graphical database clients | ||
description: How to configure graphical database clients for Teleport Database Access. | ||
--- | ||
|
||
# Graphical Database Clients | ||
|
||
This page provides instructions on how to configure various graphical database | ||
clients to work with Teleport Database Access. | ||
This article describes how to configure popular graphical database clients to | ||
work with Teleport Database Access. | ||
|
||
Pick the client you're interested in from the table of contents on the right. | ||
## Obtain local certificate/key-pair | ||
|
||
Issue the following command after you login with `tsh`: | ||
|
||
```bash | ||
# View configuration for the database you're logged in to. | ||
tsh db config | ||
# View configuration for the specific database when you're logged into multiple. | ||
tsh db config example | ||
``` | ||
|
||
It will display the path to your locally cached PEM files: | ||
|
||
``` | ||
Name: example | ||
Host: teleport.example.com | ||
Port: 3036 | ||
User: alice | ||
Database: | ||
CA: /Users/alice/.tsh/keys/teleport.example.com/certs.pem | ||
Cert: /Users/alice/.tsh/keys/teleport.example.com/alice-db/root/example-x509.pem | ||
Key: /Users/alice/.tsh/keys/teleport.example.com/alice | ||
``` | ||
|
||
The displayed `CA`, `Cert`, and `Key` files are used to connect through pgAdmin | ||
4, MySQL Workbench, and other graphical database clients that support mutual | ||
TLS authentication. | ||
|
||
## pgAdmin 4 | ||
|
||
[pgAdmin 4](https://www.pgadmin.org/) is a popular graphical client for | ||
PostgreSQL servers. | ||
|
||
pgAdmin runs as a server that stores connection information for databases and | ||
serves a management web UI. As such, pgAdmin server must run on the machine | ||
where `tsh db login` is executed and have access to the certificate authority | ||
and client certificate/key pair produced by that command. | ||
|
||
To configure a new connection, right-click on Servers in the main browser view | ||
To configure a new connection, right-click on "Servers" in the main browser view | ||
and create a new server: | ||
|
||
![pgAdmin Add Server](../../../img/database-access/[email protected]) | ||
|
||
On the General tab of the new server dialog, enter the server connection name: | ||
In the "General" tab of the new server dialog, enter the server connection name: | ||
|
||
![pgAdmin General](../../../img/database-access/[email protected]) | ||
|
||
On the Connection tab, enter the default database name (Maintenance database) | ||
and the connection service name, same as when you specify connecting using | ||
`psql`. Leave all the other fields blank: | ||
In the "Connection" tab, enter the default database name (the *maintenance | ||
database*) and the connection service name (the same one that you specify when | ||
connecting through `psql`). Leave all the other fields blank: | ||
|
||
![pgAdmin Connection](../../../img/database-access/[email protected]) | ||
|
||
On the SSL tab, set SSL mode to "full": | ||
In the "SSL" tab, set "SSL Mode" to `Verify-Full`: | ||
|
||
![pgAdmin SSL](../../../img/database-access/[email protected]) | ||
|
||
Click Save, and pgAdmin should immediately connect. | ||
Click "Save", and pgAdmin should immediately connect. | ||
|
||
## MySQL Workbench | ||
|
||
[MySQL Workbench](https://www.mysql.com/products/workbench/) is a visual tool | ||
that provides comprehensive MySQL administration and SQL development tools. | ||
|
||
To connect to a database using MySQL Workbench, first retrieve the database | ||
credentials using `tsh db login` command. After logging in, take a note of | ||
the database configuration parameters shown by `tsh db config` command: | ||
|
||
```bash | ||
$ tsh db config | ||
Name: aurora | ||
Host: root.gravitational.io | ||
Port: 3036 | ||
User: r0mant | ||
Database: | ||
CA: /Users/r0mant/.tsh/keys/root.gravitational.io/certs.pem | ||
Cert: /Users/r0mant/.tsh/keys/root.gravitational.io/r0mant-db/root/aurora-x509.pem | ||
Key: /Users/r0mant/.tsh/keys/root.gravitational.io/r0mant | ||
``` | ||
|
||
In MySQL Workbench Setup New Connection dialog, fill out Connection Name, Hostname, | ||
Port and Username: | ||
In MySQL Workbench "Setup New Connection" dialog, fill out "Connection Name", | ||
"Hostname", "Port", and "Username": | ||
|
||
![MySQL Workbench Parameters](../../../img/database-access/[email protected]) | ||
![MySQL Workbench | ||
Parameters](../../../img/database-access/[email protected]) | ||
|
||
On the SSL tab, set SSL mode to "Require and Verify Identity" and enter paths | ||
to CA, certificate and private key files from `tsh db config` command: | ||
In the "SSL" tab, set "Use SSL" to `Require and Verify Identity` and enter paths | ||
to your CA, certificate, and private key files from `tsh db config` command: | ||
|
||
![MySQL Workbench SSL](../../../img/database-access/[email protected]) | ||
|
||
Optionally, click Test Connection to verify connectivity: | ||
Optionally, click "Test Connection" to verify connectivity: | ||
|
||
![MySQL Workbench Test](../../../img/database-access/[email protected]) | ||
|
||
|
Oops, something went wrong.