Replies: 1 comment 2 replies
-
Hello @bso-oo 👋 Once you set the environment variable in the Linux machine, can you check if the value of |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug description
I have set up the DATABASE_URL environment variable using other variables like this:
example USER=postgres PASSWORD=avcd10! HOST=x.x,10.9 PORT=5432 DATABASE=xxx_dev
DATABASE_URL=postgresql://${USER}:${PASSWORD}@${HOST}:${PORT}/${DATABASE}?schema=public
datasource db { provider = "postgresql" url = env("DATABASE_URL") extensions = [pgcrypto] }
It doesn't work in Linux Ubuntu, but it works fine in my Windows local environment. When I removed the variables and hard-coded the values directly in the DATABASE_URL, it worked in Linux Ubuntu.
Why are the environment variables not working in Linux Ubuntu, while they work in Windows? Is there any difference in handling environment variables between the two operating systems?
How to reproduce
npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "xxx_dev", schema "public" at "localhost:5432"
Error: P1000: Authentication failed against database server at
localhost
, the provided database credentials for(not available)
are not valid.Please make sure to provide valid database credentials for the database server at
localhost
.Expected behavior
I removed the variables and hard-coded the values directly in the DATABASE_URL
DATABASE_URL=postgresql://postgres:avcd10!@localhost:5432/xxx_dev?schema=public
Prisma information
// Add your schema.prisma
Environment & setup
OS: Ubuntu
Database: Postgresql
node versuin: 16.20.0
Prisma Version
Beta Was this translation helpful? Give feedback.
All reactions