New MySQL driver causes java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

后端 未结 6 790
感动是毒
感动是毒 2021-02-06 04:51

If change MySQL JDBC driver from 5.1.38 to 6.0.2 I get the following exception

java.sql.SQLNonTransientConnectionException: CLIENT_PLUG         


        
6条回答
  •  半阙折子戏
    2021-02-06 05:40

    It may be due to mysql version is too old so you need to do 3 changes in that case: in application.properties do first 2 changes:

    1. spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

    2. spring.datasource.driver-class-name=com.mysql.jdbc.Driver

    3. Do changes in pom.xml file in dependency of mysql-connector-java replace scope tag to the version tag and in version write your mysql version like 5.1

提交回复
热议问题