Your connection string format is now CORRECT!
The error "password authentication failed" means we're successfully reaching the database, but the password is wrong.
https://supabase.com/dashboard/project/ygudmijcffyuarwoywmq/settings/database
Scroll down to the "Database Password" section.
- Click "Reset Database Password"
- A new strong password will be generated
- COPY IT IMMEDIATELY (you won't see it again!)
Your DATABASE_URL should look like this:
DATABASE_URL=postgresql://postgres.ygudmijcffyuarwoywmq:PASTE-NEW-PASSWORD-HERE@aws-1-ap-south-1.pooler.supabase.com:6543/postgresImportant:
- Replace
PASTE-NEW-PASSWORD-HEREwith the password you just copied - Remove any spaces
- Keep it all on one line
- No quotes around the URL
node test-db-connection.jsYou should see:
✅ SUCCESS! Database connection is working perfectly!
If your password contains: @, :, /, #, &, ?
You need to URL-encode them:
@becomes%40:becomes%3A/becomes%2F#becomes%23&becomes%26?becomes%3F
Example:
- Password from Supabase:
MyP@ss:123 - In DATABASE_URL:
MyP%40ss%3A123
Once node test-db-connection.js shows success, run:
npm run dev
curl http://localhost:3000/healthShould show: "database":"connected" ✅
Most likely issue: You need to reset the password in Supabase Dashboard and copy the new one into your .env file.