Error: P1001: Can't reach database server at localhost:5432
i made my friend clone my project on his pc fresh install of pgsql but idk why he cant connect to it
same password same everything but it says it cant reach
(pgadmin work)
using bun 1.1.26
prisma 5.20.0
26 Replies
Hi @realspinelle
Does the password contain special characters? If yes, he will need to percent encode any of the special characters. Also, what does the connection string look like? You can obfuscate the username and password when sharing.
Connection URLs (Reference) | Prisma Documentation
Learn about the format and syntax Prisma ORM uses for defining database connection URLs for PostgreSQL, MySQL and SQLite.
hi
123456789 is the password
DATABASE_URL = "postgresql://postgres:123456789@localhost:5432/panel"
The connection string looks correct. Is a VPN being used?
yes but not the problem in this case i tryed to disable / enable no change
i tryed so many things like 127.0.0.1 i was like maybe his windows fucked i tryed reinstall pgsql 2 TIMES x)
Can you probably try restarting the system to see if it helps resolve the issue?
did it already no fix
i have no idea
and he doesnt want to reinstall windows ...
tryed on 2 different pc
same error now
something is weird
trying on an another pc now
Can you try connecting to a database client like TablePlus
https://tableplus.com/
TablePlus | Modern, Native Tool for Database Management.
Modern, native client with intuitive GUI tools to create, access, query & edit multiple relational databases: MySQL, PostgreSQL, SQLite, Microsoft SQL Server, Amazon Redshift, MariaDB, CockroachDB, Vertica, Cassandra, and Redis.
working
its prisma 100%
there isnt a debug thingy to know what goes wrong ?
Can you share the repository with me
sure
i dm you ?
its a private git behind a vpn
i can add u to it but
You can use this command line statement to add debugging to it
i tryed that i found it somewhere i dont remember where and it didnt show more information
Debugging (Reference) | Prisma Documentation
This page explains how to enable debugging output for Prisma Client by setting the
DEBUG
environment variable.ok wait im trying again
once you get the logs, please paste it here. Thanks
yep
or
at launch
of my app
i added
but i have no clue why it does work for me
i have a fresh install too
OMG I FOUND
wtf
sooo.... x) shouldnt the database get automaticly created by prisma ? x)
cause i made it by hand like i just created the db not populate it and it worked
on my prod env its making the database alone
you would need to have done a
prisma db push
or prisma migrate dev
ye
but those didnt work until i made the db
100%
check i record
@RaphaelEtim
an actual weird bug
but its maybe cause of the usage of bun
there is also a bug of any command hanging in last version of bun
can you try
bunx prisma db push
?
I want to see if it gives the same error
So i can raise an issue with our engineering teamthe actual db create statement is rarely done by any orm I've ever used
db push
command in Prisma creates the db if it does not exist. https://www.prisma.io/docs/orm/reference/prisma-cli-reference#db-pushPrisma CLI reference | Prisma Documentation
This page gives an overview of all available Prisma CLI commands, explains their options and shows numerous usage examples.
It does with any commands
Well check the video i sent it doesnt
I dont have node installed on my pc