Friday, 12 May 2017

connection fail nodejs postgreSQL

I am trying to connect my NodeJS Server to the postgreSQL database, i am using sequelize to do that, the thing is that i get this error:

Possibly unhandled error: password authentication failed for user "FilipeCosta"
at Connection.parseE (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:569:11)
at Connection.parseMessage (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:396:17)
at Socket.<anonymous> (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:132:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)

i think it can have something to do with my connection configuration:

{
  "development": {
    "username": "postgres",
    "password": "mypass",
    "database": "myapp",
    "host": "localhost",
    "port": "5432",
    "dialect": "postgres"
  },
  "test": {
    "username": "root",
    "password": null,
    "database": "database_test",
    "host": "127.0.0.1",
    "dialect": "mysql"
  },
  "production": {
    "username": "root",
    "password": null,
    "database": "database_production",
    "host": "127.0.0.1",
    "dialect": "mysql"
  }
}

i get that eror when i try to run my server with ./bin/www as shown in the tutorial in the sequelize page.

any help?



via Antonio Costa

No comments:

Post a Comment