Postgresql 10: Can not establish DB connection

Multi tool use
I have created a new database and user in Postgresql 10 named 'reportingdashboardproject' and 'repadmin' respectively. I used the following commands to create and grant privileges:
postgres=# create database reportingdashboardproject;
postgres=# create user repadmin with encrypted password '<password>';
postgres=# grant all privileges on database reportingdashboardproject to repadmin;
psql=# grant all privileges on database reportingdashboardproject to repadmin ;
I get this in response when trying to start my Express.js server with a db connection URI using the above:
FATAL password authentication failed for user repadmin
Here is the relevant code:
const dbConfig = {
operatorsAliases: false
};
const Sequelize = require("sequelize");
const sequelize = new Sequelize('postgres://postgres:postgres@localhost:5432/reportingdashboardproject', dbConfig); //also tried using repadmin:<password>, failed.
I get the same error when trying to open the connection through DBeaver (port 5432)
I then tried using user: postgres and password: postgres, or empty. None of these combos worked. On the empty password attempt I saw this:
The server requested password based authentication, but no password was provided
Partial Db list (template0 and template1 were there too):
postgres=# l
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------------------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
reportingdashboardproject | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
User list:
postgres=# du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
repadmin | | {}
I have tried explicitly granting privileges to the superuser also:
postgres=# grant all privileges on database reportingdashboardproject to postgres;
GRANT
Could it be a sudo/permissions issue of some kind?
postgres=# q
could not save history to file "/opt/PostgreSQL/10/.psql_history": Permission denied
Not sure what to troubleshoot next. Thanks for any guidance.
sql postgresql
add a comment |
I have created a new database and user in Postgresql 10 named 'reportingdashboardproject' and 'repadmin' respectively. I used the following commands to create and grant privileges:
postgres=# create database reportingdashboardproject;
postgres=# create user repadmin with encrypted password '<password>';
postgres=# grant all privileges on database reportingdashboardproject to repadmin;
psql=# grant all privileges on database reportingdashboardproject to repadmin ;
I get this in response when trying to start my Express.js server with a db connection URI using the above:
FATAL password authentication failed for user repadmin
Here is the relevant code:
const dbConfig = {
operatorsAliases: false
};
const Sequelize = require("sequelize");
const sequelize = new Sequelize('postgres://postgres:postgres@localhost:5432/reportingdashboardproject', dbConfig); //also tried using repadmin:<password>, failed.
I get the same error when trying to open the connection through DBeaver (port 5432)
I then tried using user: postgres and password: postgres, or empty. None of these combos worked. On the empty password attempt I saw this:
The server requested password based authentication, but no password was provided
Partial Db list (template0 and template1 were there too):
postgres=# l
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------------------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
reportingdashboardproject | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
User list:
postgres=# du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
repadmin | | {}
I have tried explicitly granting privileges to the superuser also:
postgres=# grant all privileges on database reportingdashboardproject to postgres;
GRANT
Could it be a sudo/permissions issue of some kind?
postgres=# q
could not save history to file "/opt/PostgreSQL/10/.psql_history": Permission denied
Not sure what to troubleshoot next. Thanks for any guidance.
sql postgresql
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06
add a comment |
I have created a new database and user in Postgresql 10 named 'reportingdashboardproject' and 'repadmin' respectively. I used the following commands to create and grant privileges:
postgres=# create database reportingdashboardproject;
postgres=# create user repadmin with encrypted password '<password>';
postgres=# grant all privileges on database reportingdashboardproject to repadmin;
psql=# grant all privileges on database reportingdashboardproject to repadmin ;
I get this in response when trying to start my Express.js server with a db connection URI using the above:
FATAL password authentication failed for user repadmin
Here is the relevant code:
const dbConfig = {
operatorsAliases: false
};
const Sequelize = require("sequelize");
const sequelize = new Sequelize('postgres://postgres:postgres@localhost:5432/reportingdashboardproject', dbConfig); //also tried using repadmin:<password>, failed.
I get the same error when trying to open the connection through DBeaver (port 5432)
I then tried using user: postgres and password: postgres, or empty. None of these combos worked. On the empty password attempt I saw this:
The server requested password based authentication, but no password was provided
Partial Db list (template0 and template1 were there too):
postgres=# l
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------------------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
reportingdashboardproject | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
User list:
postgres=# du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
repadmin | | {}
I have tried explicitly granting privileges to the superuser also:
postgres=# grant all privileges on database reportingdashboardproject to postgres;
GRANT
Could it be a sudo/permissions issue of some kind?
postgres=# q
could not save history to file "/opt/PostgreSQL/10/.psql_history": Permission denied
Not sure what to troubleshoot next. Thanks for any guidance.
sql postgresql
I have created a new database and user in Postgresql 10 named 'reportingdashboardproject' and 'repadmin' respectively. I used the following commands to create and grant privileges:
postgres=# create database reportingdashboardproject;
postgres=# create user repadmin with encrypted password '<password>';
postgres=# grant all privileges on database reportingdashboardproject to repadmin;
psql=# grant all privileges on database reportingdashboardproject to repadmin ;
I get this in response when trying to start my Express.js server with a db connection URI using the above:
FATAL password authentication failed for user repadmin
Here is the relevant code:
const dbConfig = {
operatorsAliases: false
};
const Sequelize = require("sequelize");
const sequelize = new Sequelize('postgres://postgres:postgres@localhost:5432/reportingdashboardproject', dbConfig); //also tried using repadmin:<password>, failed.
I get the same error when trying to open the connection through DBeaver (port 5432)
I then tried using user: postgres and password: postgres, or empty. None of these combos worked. On the empty password attempt I saw this:
The server requested password based authentication, but no password was provided
Partial Db list (template0 and template1 were there too):
postgres=# l
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------------------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
reportingdashboardproject | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
User list:
postgres=# du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
repadmin | | {}
I have tried explicitly granting privileges to the superuser also:
postgres=# grant all privileges on database reportingdashboardproject to postgres;
GRANT
Could it be a sudo/permissions issue of some kind?
postgres=# q
could not save history to file "/opt/PostgreSQL/10/.psql_history": Permission denied
Not sure what to troubleshoot next. Thanks for any guidance.
sql postgresql
sql postgresql
asked Jan 2 at 15:56


Sean DezoysaSean Dezoysa
310315
310315
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06
add a comment |
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009350%2fpostgresql-10-can-not-establish-db-connection%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009350%2fpostgresql-10-can-not-establish-db-connection%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
cpf 2L,wuq,WoEP39Awjz1HD j oYYuk2Gjv26O3oYX5jUZJ5uazLqCsHP cjV0 IkCPw8yMz8XOQx hHVB9TuGA,jwfp9bqz
This might be better asked in the sister site, dba.stackexchange.com
– Basil Bourque
Jan 2 at 16:06