Prisma · runtime error · P1000

P1000: Authentication failed against database server

what it looks like
Authentication failed against database server, the provided database credentials for `postgres` are not valid.

Please make sure to provide valid database credentials for the database server at the configured address.

What it means

The server was reached but rejected the username or password in DATABASE_URL.

Common causes

  • A password with @, #, / or : that isn't URL-encoded, so the URL is parsed wrong
  • The database password was reset and the env var still has the old one
  • Pooler connection strings that need the user as postgres.<project-ref>, not just postgres

How to fix it

  1. URL-encode special characters in the password (@ becomes %40, # becomes %23)
  2. Copy the full connection string again from the provider and update it everywhere
  3. Redeploy after changing environment variables

works with Prisma ORM 6.19 · Next.js 16last verified

Prompt for Cursor or Claude Code

Prisma throws P1000 authentication failed. Without printing the password, check whether DATABASE_URL's password contains characters that need URL-encoding and whether the username format matches my provider's pooler. Tell me exactly what to change.

Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Prisma error fixer.

next: skip the next one

Skip the setup. The VibeBoot SaaS Starter ships a ready prisma/schema.prisma and one Prisma client in src/lib/db.ts (SQLite by default, Postgres by changing the provider), plus auth and Stripe on Next.js 16.4.3. $49, one-time.

14-day money-back guarantee · lifetime updates

$ fixed it? get the next one first

New fixes for what AI agents break, by email.

When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.

Subscribe free