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

492
Vistas
Strapi is giving credential errors when I try to connect it with postgresql even the credentials are correct

I have a newly created strapi app and tried to connect it with postgresql DB and I have entered the correct credentials but it gives me the errors called

[2022-05-25 09:30:24.315] debug: ⛔️ Server wasn't able to start properly.
[2022-05-25 09:30:24.330] error: password authentication failed for user "user"
error: password authentication failed for user "user"
at Parser.parseErrorMessage (C:\Users\user\OneDrive\Desktop\commerce- 
strapi\myshop\node_modules\pg-protocol\dist\parser.js:287:98)
at Parser.handlePacket (C:\Users\user\OneDrive\Desktop\commerce- 
strapi\myshop\node_modules\pg-protocol\dist\parser.js:126:29) 
at Parser.parse (C:\Users\user\OneDrive\Desktop\commerce- 
strapi\myshop\node_modules\pg-protocol\dist\parser.js:39:38)
at Socket.<anonymous> (C:\Users\user\OneDrive\Desktop\commerce- 
strapi\myshop\node_modules\pg-protocol\dist\index.js:11:42)    
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

and the database.js file is :

  module.exports = ({ env }) => ({
  defaultConnection: "default",
  connection: {
    client: 'postgres',
    connection: {
      host: env('DATABASE_HOST', 'localhost'),
      port: env.int('DATABASE_PORT', 5432),
      database: env('DATABASE_NAME', 'strapi'),
      username: env('DATABASE_USERNAME', 'postgres'),
      password: env('DATABASE_PASSWORD', 'lokesh'),
      schema: env('DATABASE_SCHEMA', 'public'), // Not required
    },
  },
});

I have found this database.js file for strapi v4 in a youtube video. But even if I entered correct credentials it gives me errors I have tried restarting the server soo many time but it didn't work, can anyone help me please.

about 4 years ago · Juan Pablo Isaza
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