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

后端 未结 6 706
感动是毒
感动是毒 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:51

        Use Maven depandency 
    ###pom.xml  
               
                    mysql
                    mysql-connector-java
                    5.1.37
                
    
    ##application.properties
    
    server.port=9092
    jwt.secret=javainuse
    spring.datasource.url=jdbc:mysql://localhost:3306/hospital
    spring.datasource.username=root
    spring.datasource.password=root
    spring.datasource.driver-class-name= com.mysql.jdbc.Driver
    spring.datasource.platform=mysql
    #spring.jpa.hibernate.ddl-auto=create-drop
    
    spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
    spring.jpa.hibernate.ddl-auto= update
    
    #spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
    

提交回复
热议问题