一、異常信息
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.
?翻譯過來就是:
警告:不建議在未驗(yàn)證服務(wù)器身份的情況下建立SSL連接。根據(jù)MySQL 5.5.45+, 5.6.26+和5.7.6+的要求,如果沒有設(shè)置顯式選項(xiàng),則必須默認(rèn)建立SSL連接。為了符合不使用SSL的現(xiàn)有應(yīng)用程序,將verifyServerCertificate屬性設(shè)置為“false”。您需要通過設(shè)置useSSL=false顯式禁用SSL,或者設(shè)置useSSL=true并為服務(wù)器證書驗(yàn)證提供信任存儲(chǔ)。
二、原因分析
原因是在MySQL 5.5.45+、5.6.26+和5.7.6+等版本中,不建議在沒有服務(wù)器身份驗(yàn)證的情況下建立SSL連接。當(dāng)然這只是不建議,如果我們非要這么做,也可以無視該警告信息,這只是一個(gè)警告信息,不會(huì)影響數(shù)據(jù)庫(kù)的連接和使用。
三、解決方法
只需要在 url 后面加上 userSSL = false 即可
url: jdbc:mysql://localhost:3306/leadnews_user?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false文章來源:http://www.zghlxwxcb.cn/news/detail-755638.html
?jdbc:mysql://localhost:3306/leadnews_user?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false文章來源地址http://www.zghlxwxcb.cn/news/detail-755638.html
到了這里,關(guān)于解決:WARN: Establishing SSL connection without server‘s identity verification is not recommended的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!