diff --git a/content/250-postgres/600-tcp-tunnel.mdx b/content/250-postgres/600-tcp-tunnel.mdx index b809886ac3..4dafd3ab67 100644 --- a/content/250-postgres/600-tcp-tunnel.mdx +++ b/content/250-postgres/600-tcp-tunnel.mdx @@ -93,7 +93,7 @@ password: This will start the tunnel on a randomly assigned TCP port. The proxy automatically handles authentication, so any database credentials are accepted. The tunnel also encrypts traffic, meaning clients should be set to not require SSL. -You can now connet to your Prisma Postgres editor using your favorite PostgreSQL client, e.g. `psql` or a GUI like [TablePlus](/postgres/tooling#2-connect-to-prisma-postgres-using-tableplus). To do so, you only need to provide the **`host`** and **`port`** from the output above. The TCP tunnel will handle authentication via the API key in your Prisma Postgres connection URL, so you can omit the values for **`username`** and **`password`**. +You can now connet to your Prisma Postgres editor using your favorite PostgreSQL client, e.g. `psql` or a GUI like [TablePlus](/postgres/tooling#2a-connect-to-prisma-postgres-using-tableplus) or [DataGrip](/postgres/tooling#2b-connect-to-prisma-postgres-using-datagrip). To do so, you only need to provide the **`host`** and **`port`** from the output above. The TCP tunnel will handle authentication via the API key in your Prisma Postgres connection URL, so you can omit the values for **`username`** and **`password`**. ### Customizing host and port @@ -106,7 +106,7 @@ npx @prisma/ppg-tunnel --host 127.0.0.1 --port 5432 ## Next steps -The local tunnel enables you to access Prisma Postgres from 3rd party database editors such as Postico, TablePlus and pgAdmin. Learn more in this [section](/postgres/tooling#2-connect-to-prisma-postgres-using-tableplus). +The local tunnel enables you to access Prisma Postgres from 3rd party database editors such as Postico, DataGrip, TablePlus and pgAdmin. Learn more in this [section](/postgres/tooling). ## Security considerations diff --git a/content/250-postgres/700-tooling.mdx b/content/250-postgres/700-tooling.mdx index fa95e8cd13..473873d00d 100644 --- a/content/250-postgres/700-tooling.mdx +++ b/content/250-postgres/700-tooling.mdx @@ -89,7 +89,7 @@ Copy the **`port`** from the output above, you will need it in the next step. Keep this tunnel process running while you are using the database editor to maintain the connection. -### 2. Connect to Prisma Postgres using TablePlus +### 2a. Connect to Prisma Postgres using TablePlus Based on the database editor you are using, you can connect to your Prisma Postgres instance using the details you obtained from the output of the `@prisma/ppg-tunnel` package. To add the connection string in TablePlus: @@ -103,4 +103,21 @@ Based on the database editor you are using, you can connect to your Prisma Postg - **Password**: This will be ignored due to the tunnel, you can provide any value here. 4. Click on **Connect** to connect to your Prisma Postgres instance. -![View of TablePlus connected to Prisma Postgres via tunnel](/img/ppg-tableplus.png) \ No newline at end of file +![View of TablePlus connected to Prisma Postgres via tunnel](/img/ppg-tableplus.png) + +### 2b. Connect to Prisma Postgres using DataGrip + +Based on the database editor you are using, you can connect to your Prisma Postgres instance using the details you obtained from the output of the `@prisma/ppg-tunnel` package. To add the connection string in DataGrip: + +1. Open DataGrip and click on the **+** icon and select "Datasource". +2. Select **PostgreSQL** as the database type. +3. Enter the following details: + - **Name**: Any name you want to give to your connection. + - **Host**: `127.0.0.1` in this case. + - **Port**: The **`port`** number you obtained from the output of the `@prisma/ppg-tunnel` package. + - **User**: This will be ignored due to the tunnel, you can keep this field empty. + - **Password**: This will be ignored due to the tunnel, you can keep this field empty. + - **URL**: In the URL append the following query parameter `?sslmode=disable` to the end of the URL. +4. Click on **Test Connection** to ensure that DataGrip can connect to your Prisma Postgres instance. Once successful, click **OK** to save the connection. + +![View of DataGrip connected to Prisma Postgres via tunnel](/img/ppg-datagrip.png) \ No newline at end of file diff --git a/static/img/ppg-datagrip.png b/static/img/ppg-datagrip.png new file mode 100644 index 0000000000..db2ccfcdb2 Binary files /dev/null and b/static/img/ppg-datagrip.png differ