Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

351
Views
password authentication failed for user "root", postgresSQL and docker

I'm trying to connect to my database using postgres on docker but it says that the password authentication failed.

My code:

const { Client } = require('pg');

const client = new Client({
  host: 'localhost',
  port: 5432,
  user: 'root',
  password: 'root',
  database: 'mycontacts',
});

client.connect();

docker command to start the postgres container:

docker run --name postg -e POSTGRES_USER=root2 -e POSTGRES_PASSWORD=root2 -p 5432:5432 -d postgres
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try creating another Postgres container to try and connect and it will work. Else. password authentication failed while trying to connect into my docker database

about 4 years ago · Juan Pablo Isaza Report

0

It ended up being the postgres that i had installed on my pc.

I uninstalled it and now its working!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!