From 31adc43bea458ecce52eace6e9e5940fb112ddf4 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Tue, 3 Mar 2026 08:01:50 -0500 Subject: [PATCH] chore(docs): add connection string explainer --- .../docs/postgres/database/direct-connections.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/docs/content/docs/postgres/database/direct-connections.mdx b/apps/docs/content/docs/postgres/database/direct-connections.mdx index 97d1122fe9..974b0292dc 100644 --- a/apps/docs/content/docs/postgres/database/direct-connections.mdx +++ b/apps/docs/content/docs/postgres/database/direct-connections.mdx @@ -32,9 +32,19 @@ In order to get a direct connection string, you need to: When you connect to Prisma Postgres via direct TCP, your [connection string](/orm/reference/connection-urls) looks as follows: ```bash -DATABASE_URL="postgres://USER:PASSWORD@db.prisma.io:5432/?sslmode=require" +DATABASE_URL="postgres://USER:PASSWORD@HOST:PORT/DATABASE_NAME?sslmode=require" ``` +This is built up from the following parts: + +- **User**: The name of your database user +- **Password**: The password for your database user +- **Host**: The IP or domain name of the machine where your database server is running +- **Port**: The port on which your database server is running +- **Database name**: The name of the database you want to use + + + The `USER` and `PASSWORD` values are provided when you generate credentials for your Prisma Postgres instance in the [Prisma Console](https://console.prisma.io). Here is an example with sample values: ```bash