I'm getting an authorization error when trying to connect to my postgres database through localhost. I can log in fine with sudo -u postgres psql
. When trying to connect through my Express application (using both Sequelize and node-postgres) I get an error.
error:
error: password authentication failed for user: "postgres"
.env:
PGUSER="postgres"
PGHOST=""
PGPASSWORD=""
PGDATABASE=""
PGPORT=""
sequelize config:
const sequelize = new Sequelize('postgres://postgres@localhost:5432/test', { ... });
I've edited my pg_hba.conf file, as well to accept all localhost connections with:
local all all _BLANK_ trust