docs/docs/databases/postgres/prisma-postgres.mdx
import Thumbnail from '@site/src/components/Thumbnail'; import HeadingIcon from '@site/src/components/HeadingIcon';
This guide explains how to connect a new or existing Prisma Postgres database to a Hasura instance.
Navigate to the Prisma Postgres console and sign up or log in.
Click the New Project button.
Input the proper credentials you'd like to use for your project.
<Thumbnail src="/img/cloud-dbs/prisma-postgres/prisma-input-project-settings.png" alt="Prisma Postgres project creation form with input fields for project credentials" width="700px" />Click Create Project.
You should now see your new project in the Prisma Postgres console.
From the project sidebar, click the Dashboard button, then press Connect.
Switch to the Any Client (Preview) tab.
Click the Generate Credentials button to get the database connection string.
Congratulations! You've now created a Postgres instance on Prisma Postgres which you can use with Hasura GraphQL Engine.
Navigate to Hasura Cloud and sign up or log in.
On the Hasura Cloud dashboard, create a new project:
<Thumbnail src="/img/cloud-dbs/create-hasura-cloud-project.png" alt="Hasura Cloud dashboard with Create Project button" />After the project is initialized successfully, click on Env Vars, then New Env Var to import the database connection string you generated in the previous section.
From there, give your env var a name like DATABASE_URL, paste in the database connection string, and press Save.
Click on Launch Console to open the Hasura Console in your browser.
On the Hasura Console, navigate to the Data tab and press Connect Database at the top.
From there, select Postgres and press Connect Existing Database.
Enter the name of your Env Var you created earlier, then press Connect Database.
That's it! You're now connected to your Prisma Postgres database and can start building.
You can check out our 30-Minute Hasura Basics Course and other GraphQL & Hasura Courses for a more detailed introduction to Hasura.
If using Hasura Cloud, you can also click the gear icon to manage your Hasura Cloud project. (e.g. add collaborators, env vars or custom domains).
:::info Note
For more information on which Postgres features we support, check out this page.
:::