prisma can't connect to postgres database "user was denied access"

prisma can't connect to my local postgresql database even though the user I connect with is the owner of the database...
27 Replies
سَيـْـــــــــــــــــفُ اللهِ
.env file:
DATABASE_URL="postgresql://toji@localhost:5432/aladb"
DATABASE_URL="postgresql://toji@localhost:5432/aladb"
proof this user can actually connect to the db:
سَيـْـــــــــــــــــفُ اللهِ
if anyone can help quickly I've been stuck on this for a week
Nurul
Nurul2mo ago
Your connection string should look something like:
DATABASE_URL="postgresql://username:password@localhost:5432/aladb"
DATABASE_URL="postgresql://username:password@localhost:5432/aladb"
Can you try this format? It looked like password field was missing in your connection string
سَيـْـــــــــــــــــفُ اللهِ
that's because it had no password @Nurul (Prisma) for the sake of argument, is there some command I can use to get the password for this user? or is it just the login password for the user on the system I mean is the users's password on postgresql the same as system login pass or different because I didn't set a specific password for this user in postgres
Yetzederixx
Yetzederixx2mo ago
You'll want to set a password for that user
Yetzederixx
Yetzederixx2mo ago
ALTER USER user_name WITH PASSWORD 'new_password';
Nurul
Nurul2mo ago
It's recommended to have a password, can you try setting the password with the above SQL command and pass it in the connection string and check? Let us know in case you still get the same error.
Want results from more Discord servers?
Add your server