Loading...
Loading...
Error: Can't reach database server at `localhost`:`5432` Please make sure your database server is running at `localhost`:`5432`.Prisma is unable to establish a connection to your database. This usually means the database server isn't running, it's running on a different port, or your DATABASE_URL environment variable is incorrect.
Ensure your DATABASE_URL matches your database settings exactly.
// .env
DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public"Run a command to see if the service is active.
# For PostgreSQL on Mac/Linux
sudo service postgresql status
# Or if using Docker
docker psSometimes the client just needs a fresh sync with the schema.
npx prisma generate
npx prisma db pull