{"id":714,"hash":"60699a6cf770fb6c095ef2f28fc9133800b6514a25ea1f8a9ae80445bea3077c","pattern":"prisma Error: p1001: Can&#39;t reach database server at `db.xocheossqzkirwnhzxxm.supabase.co`:`5432`","full_message":"I started learning about prisma and supabase and would like to implement both technologies in my Next.js app. After running npx prisma migrate dev --name init I was faced with the following error:\n\nEnvironment variables loaded from .env                                                                                                                                            \nPrisma schema loaded from prisma\\schema.prisma\nDatasource \"db\": PostgreSQL database \"postgres\", schema \"public\" at \"db.xocheossqzkirwnhzxxm.supabase.co:5432\"\n\nError: P1001: Can't reach database server at `db.xocheossqzkirwnhzxxm.supabase.co`:`5432`\n\nPlease make sure your database server is running at `db.xocheossqzkirwnhzxxm.supabase.co`:`5432`.\n\nmy password to the db does not contain any special characters here is my schema.prisma file:\n\n// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel Home{\n  id        String @id @default(cuid())\n  image     String?\n  title     String\n  description String\n  price     Float\n  guests    Int\n  beds      Int\n  baths     Int\n  createdAt DateTime @default(now())\n  updateAt  DateTime @updatedAt\n}\n\nhere is my .env:\n\nDATABASE_URL=\"postgresql://postgres:[YOUR-PASSWORD]@db.xocheossqzkirwnhzxxm.supabase.co:5432/postgres\"","ecosystem":"npm","package_name":"postgresql","package_version":null,"solution":"I had a similar issue with a Sveltekit application using Prisma and PlanetScale (MySQL) and Docker on Windows (WSL). I received the same error but did not have this issue when I ran it directly from terminal nor when I connected through the mysql cli.\n\nSolution\nI ensured that my Docker Node version was the same as on WSL (16.15), I have noticed others have had this issue with different versions of Node so it is worth exploring this. I then added connect_timeout=300 to my SQL URL to prevent the connection from timing out too early.\n\nI include more details in my other answer on Stackoverflow.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/73866587/prisma-error-p1001-cant-reach-database-server-at-db-xocheossqzkirwnhzxxm-sup","votes":15,"created_at":"2026-04-19T04:51:32.038297+00:00","updated_at":"2026-04-19T04:51:32.038297+00:00"}