close

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

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Unable to connect to Postgres DB due to the authentication type 10 is not supported in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Unable to connect to Postgres DB due to the authentication type 10 is not supported Error Occurs?

Today I am facing the following error Unable to connect to Postgres DB due to the authentication type 10 is not supported in Java.

How To Solve Unable to connect to Postgres DB due to the authentication type 10 is not supported Error ?

  1. How To Solve Unable to connect to Postgres DB due to the authentication type 10 is not supported Error ?

    To Solve Unable to connect to Postgres DB due to the authentication type 10 is not supported Error the supported JDBC driver for SCRAM-SHA-256 encryption is 42.2.0 or above. In my case, the driver was 41.1.1. Change it to 42.2.0 or above. That fixed it for me.

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

    To Solve Unable to connect to Postgres DB due to the authentication type 10 is not supported Error the supported JDBC driver for SCRAM-SHA-256 encryption is 42.2.0 or above. In my case, the driver was 41.1.1. Change it to 42.2.0 or above. That fixed it for me.

Solution 1

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

  1. Change password_encryption to md5.File: C:\Program Files\PostgreSQL\13\data\postgresql.conf
  2. Change scram-sha-256 to md5 in host settings.File: C:\Program Files\PostgreSQL\13\data\pg_hba.conf.host all all 0.0.0.0/0 md5
  3. Change Password ( this restore password in md5 format).Example: ALTER ROLE postgres WITH PASSWORD 'root';
  4. Make sure you set listen_addresses = '*' if you are working non production environment.File : C:\Program Files\PostgreSQL\13\data\postgresql.conf

Solution 2

the supported JDBC driver for SCRAM-SHA-256 encryption is 42.2.0 or above. In my case, the driver was 41.1.1. Change it to 42.2.0 or above. That fixed it for me.

(Maven, pom.xml):

<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.2.0</version>
</dependency>

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read