61 java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Jan 16 08:05:35 CST 2020
There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required ### The error may exist in file [E:\works\boot\sy\esaycode\target\classes\mapper\UserDao.xml] ### The error may involve com.taotao.esaycode.dao.UserDao.queryById ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

java.sql.SQLNonTransientConnectionException:需要客户端插件身份验证

原因分析:
将mysql-connector-java由5.1.34升级到了6.0.6,本机MySQL5.7使用没问题,连测试服务器MySQL5.5创建数据库连接报错
解决方案:
将mysql-connector-java的版本退回到5.1.34。


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

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




©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容