Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda