Postgresql 10: Can not establish DB connection

Multi tool use
Multi tool use












0















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.










share|improve this question























  • This might be better asked in the sister site, dba.stackexchange.com

    – Basil Bourque
    Jan 2 at 16:06
















0















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.










share|improve this question























  • This might be better asked in the sister site, dba.stackexchange.com

    – Basil Bourque
    Jan 2 at 16:06














0












0








0








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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



















  • 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












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
});


}
});














draft saved

draft discarded


















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
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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
4ibCUm,BT62k3PyNXPutEmby3 imqSaGHEuvcxzIWUduTZ

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas