連接mysql出現(xiàn)了:Establishing SSL connection without server's identity verification is not recommended

連接mysql出現(xiàn)了:Establishing SSL connection without server's identity verification is not recommended

最近自己搭的一套代碼評(píng)審工具(Fisheye+Crucible)總是出問題,查看日志,發(fā)現(xiàn)有一個(gè)WARN總是肆無忌憚的出現(xiàn),黑壓壓的一片,對(duì)于有強(qiáng)迫癥的我來說看著很不爽,于是決定kill it

注意:出現(xiàn)這類提示也不會(huì)影響對(duì)數(shù)據(jù)庫的增刪改查操作,所以不用緊張。。

詳細(xì)的警告提示:

?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.

?翻譯過來就是:不建議不使用服務(wù)器身份驗(yàn)證建立SSL連接,必須默認(rèn)建立SSL連接。

解決辦法如下,在與數(shù)據(jù)庫建立連接的url后加上下面這段

?autoReconnect=true&useSSL=false

我原來的url是

jdbc:mysql://181.137.128.32:3306/fecru

加上后變成

jdbc:mysql://181.137.128.32:3306/fecru?autoReconnect=true&useSSL=false


重啟工具,日志中黑壓壓的一堆,小事不見了,日志看著清爽多了...

?

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容