I solved similar issue by applying below steps in PostgreSQL Version 13:
- Change
password_encryption
tomd5
inpostgresql.conf
Windows: C:\Program Files\PostgreSQL\13\data\postgresql.conf
GNU/Linux: /etc/postgresql/13/main/postgresql.conf
- Change
scram-sha-256
tomd5
inpg_hba.conf
Windows: C:\Program Files\PostgreSQL\13\data\pg_hba.conf
GNU/Linux: /etc/postgresql/13/main/pg_hba.conf
host all all 0.0.0.0/0 md5
-
Change Password ( this restore password in md5 format).
Example:
ALTER ROLE postgres WITH PASSWORD 'root'
; -
Make sure you set
listen_addresses="*"
inpostgresql.conf
if you are working non production environment.