R
Railwayβ€’10mo ago
VINCENT

Error: P1001: Can't reach database server

anybody any help ?
25 Replies
Percy
Percyβ€’10mo ago
Project ID: N/A
Brody
Brodyβ€’10mo ago
going to need much more information than this
VINCENT
VINCENTβ€’10mo ago
thank you , what do you need me to do ?
Brody
Brodyβ€’10mo ago
where do you get this error tell me more information, any information
VINCENT
VINCENTβ€’10mo ago
in my vs code via termianl using command "npx prisma migrate dev" "dependencies": { "@prisma/client": "^5.7.1", "@types/node": "20.10.6", "@types/react": "18.2.46", "@types/react-dom": "18.2.18", "next": "14.0.4", "prisma": "^5.7.1", "react": "18.2.0", "react-dom": "18.2.0", "ts-node": "^10.9.2", "typescript": "5.3.3" },
Brody
Brodyβ€’10mo ago
where have you set the database credentials for local use?
VINCENT
VINCENTβ€’10mo ago
Postgres if i understood your question correctly
Brody
Brodyβ€’10mo ago
where have you set the database url variable so that you can use it locally
VINCENT
VINCENTβ€’10mo ago
in .env file DATABASE_URL = "the url"
Brody
Brodyβ€’10mo ago
is prisma setup to load the variables from that .env file?
VINCENT
VINCENTβ€’10mo ago
datasource db { provider = "postgresql" url = env("DATABASE_URL") } in the file schema.prisma seems counfusing dosen`t it ?
Brody
Brodyβ€’10mo ago
but are the variables in your .env file being loaded before running the migrations
VINCENT
VINCENTβ€’10mo ago
idk how can ensure that?
Brody
Brodyβ€’10mo ago
that would be a question for prisma's documentation and side question, can you connect to the database on railway with something like dbgate?
VINCENT
VINCENTβ€’10mo ago
you think the problem lies in prisma configuration ? and what is even that
Brody
Brodyβ€’10mo ago
a database client
VINCENT
VINCENTβ€’10mo ago
damn i`m too noob
Brody
Brodyβ€’10mo ago
no worries we all start somewhere
VINCENT
VINCENTβ€’10mo ago
you got me emmotinal bro for that i got no answer becuz everbody working with prisma so ii just follow it
Brody
Brodyβ€’10mo ago
have you tried connecting to the database with dbgate yet?
VINCENT
VINCENTβ€’10mo ago
no where can ii learn that i have no experince in back-end what so ever
Brody
Brodyβ€’10mo ago
we all start somewhere but you can start by googling for dbgate πŸ˜‰ don't overthink this
VINCENT
VINCENTβ€’10mo ago
ok if you would give me easy tools to get me up and running with next js what would that be ?
Brody
Brodyβ€’10mo ago
please try connecting to your railway database with dbgate
VINCENT
VINCENTβ€’10mo ago
thanks i`ll see to plus2salute
Want results from more Discord servers?
Add your server