Unable to connect to Postgres DB due to the authentication type 10 is not supported

I solved similar issue by applying below steps in PostgreSQL Version 13:

  1. Change password_encryption to md5 in postgresql.conf
Windows: C:\Program Files\PostgreSQL\13\data\postgresql.conf
GNU/Linux:           /etc/postgresql/13/main/postgresql.conf

enter image description here

  1. Change scram-sha-256 to md5 in pg_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

enter image description here

  1. Change Password ( this restore password in md5 format).

    Example: ALTER ROLE postgres WITH PASSWORD 'root';

  2. Make sure you set listen_addresses="*" in postgresql.conf if you are working non production environment.

Leave a Comment