Posts

Showing posts with the label psql

psql: error: connection to server at "localhost" (127.0.0.1), port 5433 failed: ERROR: failed to authenticate with backend using SCRAM DETAIL: valid password not found

Image
ERROR psql: error: connection to server at "localhost" (127.0.0.1), port 5433 failed: ERROR: failed to authenticate with backend using SCRAM DETAIL: valid password not found Since Pgpool-II is a PostgreSQL proxy that works between clients and PostgreSQL servers, the authentication comprises two steps: Authentication between client and Pgpool-II Authentication between Pgpool-II and PostgreSQL servers Starting with Pgpool-II 4.0, Pgpool-II supports scram-sha-256 authentication. scram-sha-256 authentication method is strongly recommended because it is the most secure password-based authentication method. Solution 1 If PostgreSQL servers require  MD5  or  SCRAM  authentication for some user’s authentication but the password for that user is not present in  pool_passwd , then enabling  allow_clear_text_frontend_auth  will allow the  Pgpool-II  to use clear-text-password authentication with user to get the password in plain text form from the user ...

ERROR: pid 29754: initializing pool password, failed to open file:"/etc/pgpool2/pool_passwd"

Image
  If you encountered the error: ERROR: pid 29506 : initializing pool password, failed to open file: "/etc/pgpool2/pool_passwd" Than you have to change the owner of the file  pool_passwd  to  postgres : sudo chown -R postgres:postgres /etc/pgpool2/pool_passwd Finally you can run: su - postgres pg_enc -m -k ~/.pgpoolkey -f /etc/pgpool2/pgpool.conf -u vstat -p Related article on: https://dev.smirnov.app/2022/06/psql-error-connection-to-server-failed-to-authenticate-with-backend-using-scram-detail.html

Allow Remote Connection to PostgreSQL / no pg_hba.conf entry for host ***.**.**.*

  When you install PostgreSQL, by default connection to the database using TCP/IP is not allowed. When you try to connect from a client to a remote PostgreSQL database using  psql  command, you might get a  psql: could not connect to server: Connection refused  error message. In the following example, from a client machine, we are trying to connect to a PostgreSQL database that is running on  66.249.75.34  server. As you see from the output, it clearly says that the remote PostgreSQL database is not accepting connection. # psql -U postgres -h 66.249.75.34 psql: could not connect to server: Connection refused Is the server running on host "66.249.75.34" and accepting TCP/IP connections on port 5432 ? To enable TCP/IP connection for PostgreSQL database, you need to follow the two steps mentioned below. 1. Modify  pg_hba.conf  to Add Client Authentication Record On the PostgreSQL database server, by default, you’ll notice the f...