Hi all - sorry to post in general but I'm stuck tr...
# orm-help
j
Hi all - sorry to post in general but I'm stuck trying to get prisma set up with an AWS RDS postgres database and not sure where the issue is. My next.js app (using prisma client) cannot connect to my RDS database, but prisma studio and
npx prisma migrate save/up
interact with it just fine. It's complaining that authentication failed, but I know it's the correct username and password because I can interact with the database in every environment except in my app (prisma studio, prisma migrate, pgAdmin all work). Any ideas?
Copy code
Authentication failed against database server at `<postgres-url>`, the provided database credentials for `<user>` are not valid.

Please make sure to provide valid database credentials for the database server at `<postgres-url>`.
    at $w.request (/Users/jh/coprime/hq/node_modules/@prisma/client/runtime/index.js:212:54)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'P1000',
  clientVersion: '2.9.0',
  meta: {
    database_user: 'coprime',
    database_host: '<postgres-url>'
  }
}
Figured it out! I had a
$
in my password. When I logged the Prisma client in my
getStaticProps
call, my password for the db from the
env
file was there, but without the
$
. I'm not sure if this is because it was in the
env
file and env ignores it, or if it's a bug with Prisma.
r
You need to add a backslash (
\
) before the
$
to include it as it is a special character.