Replace special characters with percent-encodings
Make sure that in your DATABASE_URL in the .env file, the special characters in your username and password are replaced with percent-encodings.
For example, in your database URL, if your username or password contains @ character, it should be replaced with its equivalent percent-encoding, that is %40. For # it is %23 and so on. See the list below.
Percent-encodings
Following are the percent-encodings for the frequently used special characters:
| Special Character | Percent Encoding |
|---|---|
! |
%21 |
# |
%23 |
$ |
%24 |
% |
%25 |
& |
%26 |
' |
%27 |
( |
%28 |
) |
%29 |
* |
%2A |
+ |
%2B |
, |
%2C |
/ |
%2F |
: |
%3A |
; |
%3B |
= |
%3D |
? |
%3F |
@ |
%40 |
[ |
%5B |
] |
%5D |
newline |
%0A or %0D or %0D%0A |
space |
%20 |
" |
%22 |
% |
%25 |
- |
%2D |
. |
%2E |
< |
%3C |
> |
%3E |
\ |
%5C |
^ |
%5E |
_ |
%5F |
` |
%60 |
{ |
%7B |
| |
%7C |
} |
%7D |
~ |
%7E |
ยฃ |
%C2%A3 |
ๅ |
%E5%86%86 |
prisma can't connect to postgresql - Stack Overflow
Prisma Postgres โ Runs on bare metal and unikernels
Stuck for hours with Prisma, Postgres and Express : r/node
How I got Prisma working smoothly in Next.js 15
Hi people, I just read on Pirsma doc that Prisma Postgres contains a risk on total data loss. Yet they say it's because of the absence of automated backups only I'm still worried, can I use it for my hobby project or should I wait ?
EDIT: Doc link: https://www.prisma.io/docs/orm/overview/databases/prisma-postgres
Replace special characters with percent-encodings
Make sure that in your DATABASE_URL in the .env file, the special characters in your username and password are replaced with percent-encodings.
For example, in your database URL, if your username or password contains @ character, it should be replaced with its equivalent percent-encoding, that is %40. For # it is %23 and so on. See the list below.
Percent-encodings
Following are the percent-encodings for the frequently used special characters:
| Special Character | Percent Encoding |
|---|---|
! |
%21 |
# |
%23 |
$ |
%24 |
% |
%25 |
& |
%26 |
' |
%27 |
( |
%28 |
) |
%29 |
* |
%2A |
+ |
%2B |
, |
%2C |
/ |
%2F |
: |
%3A |
; |
%3B |
= |
%3D |
? |
%3F |
@ |
%40 |
[ |
%5B |
] |
%5D |
newline |
%0A or %0D or %0D%0A |
space |
%20 |
" |
%22 |
% |
%25 |
- |
%2D |
. |
%2E |
< |
%3C |
> |
%3E |
\ |
%5C |
^ |
%5E |
_ |
%5F |
` |
%60 |
{ |
%7B |
| |
%7C |
} |
%7D |
~ |
%7E |
ยฃ |
%C2%A3 |
ๅ |
%E5%86%86 |
For anyone running into this, see the comments above on the answer!
Removing symbols from the db password (hosted on AWS RDS) fixed the problem for me.