-
QuestionWhen I try to make any query to the DB (PostgreSQL) I get the following error:**⨯ PrismaClientInitializationError: It seems like a connection error, but I have already checked the environment variable and it is correct, the migration has already been run successfully and also the generation (npx prisma generate). I also made sure that the environment variable is read correctly and even did connection tests with a prisma validate. I hope you can help me, I have not been able to find the cause of the error. How to reproduce (optional)No response Expected behavior (optional)No response Information about Prisma Schema, Client Queries and Environment (optional)-schema.prisma
-Prisma Client querie
-db.js:
-.env example structure: DATABASE_URL="postgresql://postgres:pass@127.0.0.1:5432/nextjs_prisma_auth?schema=public"
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @HenryCBQ 👋 Thank you for raising this question. Can you reconfirm that your PostgreSQL server is running and accessible at |
Beta Was this translation helpful? Give feedback.
Hi @HenryCBQ 👋
Thank you for raising this question.
Can you reconfirm that your PostgreSQL server is running and accessible at
127.0.0.1:5432
. You can verify this by trying to connect to your database using a database client like pgAdmin or TablePlus or the psql command-line utility. Also, if you have special characters in your password for example@
, you will need to percent encode it as shown in this section of the documentation