'cannot connect to Postgres - password unknown
Solution 1:[1]
This worked for me.
Change METHOD of all rows in your pg_hba.conf
file from scram-sha-256
to trust
(C:\Program Files\PostgreSQL\14\data\pg_hba.conf). This will disable password for your DB.
Click on any database in postgresql to use Query Tool.
In Query Tool type ALTER USER postgres WITH PASSWORD 'User_password';
postgres
is default username, execute it.
This way you can set up a password for your db, after that go back to the first step and change it back from trust
to scram-sha-256
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |