apps/docs/content/docs.v6/postgres/integrations/viewing-data.mdx
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 for you in of 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:
You can also run Prisma Studio locally by running:
npx prisma studio
This should start a live server in http://localhost:5555 where you can visit and interact with your database.
You can connect to your Prisma Postgres instance using third party database editors like pgAdmin, TablePlus, Postico etc using @prisma/ppg-tunnel package. See the example below to connect using TablePlus.
If you already have a .env file in your current directory with DATABASE_URL set, the tunnel CLI will automatically pick it up, no need to manually export it. However, if you haven't set up a .env file, you'll need to set the DATABASE_URL environment variable explicitly.
In your terminal, to set the environment variable DATABASE_URL referring to your Prisma Postgres instance which you want to connect to (be sure to replace the API_KEY placeholder with the API key value of your Prisma Postgres instance):
export DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=API_KEY"
export DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=API_KEY"
set "DATABASE_URL=prisma+postgres://accelerate.prisma-data.net/?api_key=API_KEY"
:::note
If you explicitly set DATABASE_URL in your terminal, that value will take precedence over the one in your .env file.
:::
Run the following command to connect to your Prisma Postgres instance via @prisma/ppg-tunnel package:
npx @prisma/ppg-tunnel --host 127.0.0.1 --port 52604
Prisma Postgres auth proxy listening on 127.0.0.1:52604 🚀
Your connection is authenticated using your Prisma Postgres API key.
...
==============================
hostname: 127.0.0.1
port: 52604
username: <anything>
password: <none>
==============================
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.
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:
127.0.0.1 in this case.port number you obtained from the output of the @prisma/ppg-tunnel package.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:
127.0.0.1 in this case.port number you obtained from the output of the @prisma/ppg-tunnel package.?sslmode=disable to the end of the URL.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 DBeaver:
jdbc:postgresql://localhost:52604/postgres?sslmode=disable. Here make sure that you enter the port number you obtained from the output of the @prisma/ppg-tunnel package. In this case, the port number is 52604. There is no need to enter Username or Password as authentication is manged by Tunnel.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 Postico:
127.0.0.1 in this case.port number you obtained from the output of the @prisma/ppg-tunnel package.cat <<eof
{
"sslmode":"disable",
}
eof