国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

連接MySQL 8.0時報錯caching_sha2_password解決方案

這篇具有很好參考價值的文章主要介紹了連接MySQL 8.0時報錯caching_sha2_password解決方案。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:868)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:864)
	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1746)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2191)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2222)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2017)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:779)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
	at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156)
	at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218)
	at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1572)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1636)
	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2505)
Sun Aug 27 15:43:26 CST 2023 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

由于我安裝的mysql 8.0,8.0和5.x其中一個改動就是加密認證方式發(fā)生改變:

  • caching_sha2_password是8.0
  • mysql_native_password是5.x

解決方案

更改mysql的jdbc版本

直接在xx.pom修改版本號即可。

mysql jdbc的maven鏈接:http://mvnrepository.com/artifact/mysql/mysql-connector-java
比如:文章來源地址http://www.zghlxwxcb.cn/news/detail-677681.html

<mysql-connector.version>8.0.33</mysql-connector.version>

到了這里,關于連接MySQL 8.0時報錯caching_sha2_password解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • MySQL 8.0.31 登錄提示caching_sha2_password問題解決方法

    MySQL 8.0.31 使用了 caching_sha2_password 作為默認的身份驗證插件,這可能導致一些舊的客戶端和庫無法連接到服務器。以下是一些解決此類問題的常見步驟和建議: 確保MySQL服務正在運行:首先,確保你的MySQL服務器實例正在運行。你可以使用系統(tǒng)的服務管理工具來檢查。 更新你

    2024年02月12日
    瀏覽(24)
  • workbench 鏈接mysql 報錯 authentication plugin caching_sha2_password

    workbench 鏈接mysql 報錯 authentication plugin caching_sha2_password

    用workbench連接MySQL出現(xiàn)Authentication plugin ‘caching_sha2_password’ cannot be loaded的問題,如下圖 原因 出現(xiàn)這個問題的原因是由于Navicat和MySQL的版本問題, mysql8 之前,加密規(guī)則是mysql_native_password; mysql8 之后,加密規(guī)則是caching_sha2_password。 解決方法一種是升級Navicat驅動,一種是My

    2024年02月11日
    瀏覽(27)
  • MYSQL解決“plugin caching_sha2_password could not be loaded”

    MYSQL解決“plugin caching_sha2_password could not be loaded”

    目錄 ????????1. 登錄mysql ????????2.查看用戶的密碼規(guī)則,及對應host? ????????3.修改加密規(guī)則及密碼(注意:下面代碼的 % 是對應host中的內(nèi)容) 概述 “ plugin caching_sha2_password could not be loaded”,是無法加載插件緩存sha2密碼,?在MySQL 8.0中,caching_sha2_password是默認的

    2024年02月07日
    瀏覽(31)
  • error 2059: Authentication plugin ‘caching_sha2_password‘ cannot be loaded: /usr/lib64/mysql/plugin/

    error 2059: Authentication plugin ‘caching_sha2_password‘ cannot be loaded: /usr/lib64/mysql/plugin/

    Mysql學習中,嘗試遠程登錄報(2059)錯誤:(從虛擬機登錄到本地的mysql8.0.26版本) 想要實現(xiàn)mysql的遠程登錄 我的嘗試,從虛擬機登錄到本地mysql 方法一: 修改密碼的加密方式,對后續(xù)的新建用戶有效(在添加下述語句后,后續(xù)的新用戶加密方式默認被改為了mysql_native_password)

    2024年02月09日
    瀏覽(24)
  • 2059-Authentication plugin‘caching_sha2_password‘cannot be loaded

    2059-Authentication plugin‘caching_sha2_password‘cannot be loaded

    2059-Authentication plugin’caching_sha2_password’cannot be loaded 由于目前已有的客戶端連接軟件還不支持Mysql8新增加的加密方式:caching_sha2_password 老的加密驗證方式:mysql_native_password 1、打開MySQL 8.0 Command Line Client,控制面板搜索即可搜到,打開即可 2、輸入密碼 3、輸入以下命令 其實

    2024年02月05日
    瀏覽(20)
  • MGR新節(jié)點RECOVERING狀態(tài)的分析與解決:caching_sha2_password驗證插件的影響

    MGR新節(jié)點RECOVERING狀態(tài)的分析與解決:caching_sha2_password驗證插件的影響

    在GreatSQL社區(qū)上有一位用戶提出了“手工構建MGR碰到的次節(jié)點一直處于recovering狀態(tài)”,經(jīng)過排查后,發(fā)現(xiàn)了是因為新密碼驗證插件 caching_sha2_password 導致的從節(jié)點一直無法連接主節(jié)點,帖子地址:(https://greatsql.cn/thread-420-2-1.html)) 本文驗證環(huán)境,以及本文所采用數(shù)據(jù)庫為 Gre

    2024年02月09日
    瀏覽(22)
  • java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘解決

    java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘解決

    最近遇到了?java.sql.SQLException: Unable to load authentication plugin \\\'caching_sha2_password\\\'.這個報錯。 主要原因8.x版本的驗證模塊和之前版本不同: 5.x版本是:default_authentication_plugin=mysql_native_password 8.x版本就是:default_authentication_plugin=caching_sha2_password ? 解決方案 ①更新mysql驅動的jar版本

    2024年01月21日
    瀏覽(22)
  • 使用pymysql報錯RuntimeError ‘cryptography‘ package is required for sha256_password or caching_sha2_passw

    使用pymysql報錯RuntimeError ‘cryptography‘ package is required for sha256_password or caching_sha2_passw

    使用pymysql連接MySql數(shù)據(jù)庫報錯RuntimeError: 該錯誤提示的意思是:sha256_password和caching_sha2_password兩種加密方式需要cryptography。 所以只需要安裝一下cryptography包就可以了: 安裝完成后,重新執(zhí)行, 就ok了。

    2024年02月08日
    瀏覽(21)
  • Linux下報錯MySQL Access denied for user ‘root‘@‘localhost‘ (using password: YES)解決方案

    Linux下報錯MySQL Access denied for user ‘root‘@‘localhost‘ (using password: YES)解決方案

    1.先進入root模式 2.進入#vim /etc/my.cnf 在[mysqld]后面任意一行添加“skip-grant-tables”用來跳過密碼驗證的過程,保存退出 3.systemctl restart mysql#重啟服務 ? 或者 ? ?service mysqld restart#重啟服務 4.mysql -uroot -p 沒有密碼可以直接進入 5.update mysql.user set authentication_string=PASSWORD(\\\'你的新密碼

    2024年02月09日
    瀏覽(22)
  • windows系統(tǒng)下mysql的 Access denied for user ‘root‘@‘localhost‘ (using password: NO)解決方案

    windows系統(tǒng)下mysql的 Access denied for user ‘root‘@‘localhost‘ (using password: NO)解決方案

    在配置mysql的過程中出現(xiàn)了這樣的問題: 在啟動Mysql服務后,輸入mysqladmin -u root password 1234設置初始密碼,顯示: mysqladmin: connect to server at \\\'localhost\\\' failed error: \\\'Access denied for user \\\'root\\\'@\\\'localhost\\\' (using password: NO)\\\' 似乎是因為之前在電腦上已經(jīng)配置過其他版本的mysql服務器,導致密

    2024年02月06日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包