Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Viewing data

You can view and edit your data in Prisma Postgres using either Prisma Studio or 3rd party database editors.

With Prisma Postgres, a hosted version of Prisma Studio is available in your project. In your project environment in the Platform Console, select the Studio tab in the left-hand navigation to view and edit your data:

View of Prisma Studio open in the console.

You can also run Prisma Studio locally. Studio ships with the Prisma ORM 7 CLI and works with Prisma ORM 7 and Prisma ORM 8 databases alike. Point it at the direct connection string of your database:

title="bun"
bunx prisma@prev studio --url="postgres://USER:PASSWORD@db.prisma.io:5432/postgres?sslmode=require"
pnpm
pnpm dlx prisma@prev studio --url="postgres://USER:PASSWORD@db.prisma.io:5432/postgres?sslmode=require"
yarn
yarn dlx prisma@prev studio --url="postgres://USER:PASSWORD@db.prisma.io:5432/postgres?sslmode=require"
npm
npx prisma@prev studio --url="postgres://USER:PASSWORD@db.prisma.io:5432/postgres?sslmode=require"

This should start a live server in http://localhost:5555 where you can visit and interact with your database.

If your database is managed with Prisma ORM, Studio also shows a Migrations view alongside your tables, with a visual diff of what each applied migration changed. See Studio with Prisma ORM.

You can connect to your Prisma Postgres instance using third party database editors like pgAdmin, TablePlus, DataGrip, DBeaver or Postico with the direct connection string of your database. See the examples below.

In the Prisma Console, select your database, click Connect to your database and generate a connection string. Copy the direct value, which looks like this:

postgres://USER:PASSWORD@db.prisma.io:5432/postgres?sslmode=require

Database editors typically ask for the individual parts of that connection string:

Field Value
Host db.prisma.io
Port 5432
Database postgres
User The USER part of the connection string
Password The PASSWORD part of the connection string
SSL mode require

Use the direct connection string for database editors, migrations and other administrative tooling. Application traffic should use the pooled connection string instead. Learn more in Connecting to your database.

To add the connection in TablePlus:

  1. Open TablePlus and click on the + icon to add a new connection.

  2. Select PostgreSQL as the database type.

  3. Enter the following details:

    • Name: Any name you want to give to your connection.
    • Host: db.prisma.io.
    • Port: 5432.
    • User: The USER part of your direct connection string.
    • Password: The PASSWORD part of your direct connection string.
    • Database: postgres.
    • SSL mode: require.
  4. Click on Connect to connect to your Prisma Postgres instance.

View of TablePlus connected to Prisma Postgres

To add the connection 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: db.prisma.io.
    • Port: 5432.
    • Database: postgres.
    • User: The USER part of your direct connection string.
    • Password: The PASSWORD part of your direct connection string.
    • URL: Make sure the URL ends with the query parameter ?sslmode=require.
  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

To add the connection in DBeaver:

  1. Open DBeaver and click on the New Database Connection button or File > New to add a new connection.

  2. Select PostgreSQL as the database type.

  3. Select URL option in Connect by section.

  4. Enter the URL in this format:

    • URL: Your URL should be in this format: jdbc:postgresql://db.prisma.io:5432/postgres?sslmode=require. Enter the USER and PASSWORD parts of your direct connection string as Username and Password.
  5. Click on Test Connection to ensure that DBeaver can connect to your Prisma Postgres instance. If successful, click Finish.

View of DBeaver connected to Prisma Postgres

To add the connection in Postico:

  1. Open Postico and click on the New Server button to add a new connection.

  2. Enter the following details:

    • Name: Any name you want to give to your connection.
    • Host: db.prisma.io.
    • Port: 5432.
    • User: The USER part of your direct connection string.
    • Password: The PASSWORD part of your direct connection string.
    • Database: postgres.
  3. Check "Pre-Connect Shell Script" and enter:

    cat <<eof
    
    {
    
    "sslmode":"require",
    
    }
    
    eof
  4. Click on Test Connection to ensure that Postico can connect to your Prisma Postgres instance. If successful, click Connect.

View of Postico connected to Prisma Postgres
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu