error: password authentication failed for user "postgres"

I'm trying to connect to my DB using Drizzle. I run the command: drizzle-kit push Here is the config:
export default defineConfig({
out: "./db/drizzle",
schema: "./db/schemas/*",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
export default defineConfig({
out: "./db/drizzle",
schema: "./db/schemas/*",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
Yes, the process.env.DATABASE_URL (I logged it) is correct:
DATABASE_URL=pg://postgres:postgres@localhost:5432/my_db
DATABASE_URL=pg://postgres:postgres@localhost:5432/my_db
Yes, the username & password is correct. Yes, the port is correct. Yes, the DB name is correct. I can connect to my DB just fine through pgAdmin4 interface. Error
% npm run db:push

> drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/johndoe/Projects/my_project/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] Pulling schema from database...
error: password authentication failed for user "postgres"
at /Users/johndoe/Projects/my_project/node_modules/pg-pool/index.js:45:11
% npm run db:push

> drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/johndoe/Projects/my_project/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] Pulling schema from database...
error: password authentication failed for user "postgres"
at /Users/johndoe/Projects/my_project/node_modules/pg-pool/index.js:45:11
I'm on Mac if that matters. At some point I was wondering if it has to do with the Postgres Authentication Configuration. In my pg_hba.conf, I have method scram-sha-256. Does Drizzle use another encryption method?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server