Anjali
Anjali

Reputation: 1718

MySQL 8.0.11 is throwing CLIENT_PLUGIN_AUTH is required

I am new to Java. I created Java Maven project and am getting the below error while connecting to MySQL. I am posting my code below.

In pom.xml,

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.11</version>
</dependency>

In class,

 private void connection() {
     try {
            Class.forName("com.mysql.cj.jdbc.Driver").newInstance();
            connect = DriverManager.getConnection("jdbc:mysql://10.100.00.00:3305/dbname" , 
                                    "username","password");     
     }
     catch(SQLException ex) {       
         System.out.println(ex.getMessage());

     }
     catch(Exception ex) {      
         System.out.println(ex.getMessage());
     }
 }

It was throwing java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required from SQLException.

Upvotes: 3

Views: 10722

Answers (1)

Winter MC
Winter MC

Reputation: 375

As a result of the java mysql connector driver being incompartible with the installed version of MYSQL DB.

Kindly check answer posted by @P Satish Patro on this post: Spring boot CLIENT_PLUGIN_AUTH is required

Upvotes: 0

Related Questions