Skip to content

Commit

Permalink
docs: multiple small fixes around databases (#14321)
Browse files Browse the repository at this point in the history
* docs: multiple small fixes around databases

* add link to postgres SSL options
  • Loading branch information
srinify authored Apr 28, 2021
1 parent 43ee52b commit bbdb4ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
23 changes: 9 additions & 14 deletions docs/src/pages/docs/Connecting to Databases/mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ version: 1

## MySQL

The recommended connector library for MySQL is [mysqlclient](https://pypi.org/project/mysqlclient/).
The recommended connector library for MySQL is [mysql-connector-python](https://pypi.org/project/mysql-connector-python/).

Set up the Connection String using the following settings:
Here's the connection string:

User Name: UserName
Password: DBPassword
Database Host:
- For Localhost or docker running Linux: localhost or 127.0.0.1
- For On Prem: IP address or Host name
- For AWS Endpoint
- For Docker running in OSX: docker.for.mac.host.internal
Database Name: Database Name
Port: default 3306

Connection String
```
mysql://<UserName>:<DBPassword>@<Database Host>/<Database Name>
mysql+mysqlconnector://{username}:{password}@{host}/{database}
```

Host:
- For Localhost or Docker running Linux: `localhost` or `127.0.0.1`
- For On Prem: IP address or Host name
- For Docker running in OSX: `docker.for.mac.host.internal`
Port: `3306` by default
9 changes: 6 additions & 3 deletions docs/src/pages/docs/Connecting to Databases/postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ Postgres sample connection parameters:
The connection string looks like:

```
postgresql+psycopg2://{username}:{password}@{host}:{port}/{database}
postgresql://{username}:{password}@{host}:{port}/{database}
```

Extra parameters:
You can require SSL by adding `?sslmode=require` at the end:

```
?sslmode=require
postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=require
```

You can read about the other SSL modes that Postgres supports in
[Table 31-1 from this documentation](https://www.postgresql.org/docs/9.1/libpq-ssl.html).

More information about PostgreSQL connection options can be found in the
[SQLAlchemy docs](https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2)
and the
Expand Down
15 changes: 13 additions & 2 deletions docs/src/pages/docs/Connecting to Databases/presto.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ The expected connection string is formatted as follows:

```
presto://{hostname}:{port}/{database}
e.g.
presto://presto.example.com:8080/hive
```

You can pass in a username and password as well:

```
presto://{username}:{password}@{hostname}:{port}/{database}
```

Here is an example connection string with values:

```
presto://datascientist:securepassword@presto.example.com:8080/hive
```

By default Superset assumes the most recent version of Presto is being used when querying the
datasource. If you’re using an older version of Presto, you can configure it in the extra parameter:


```
{
"version": "0.123"
Expand Down

0 comments on commit bbdb4ee

Please sign in to comment.