MySQL建立SSL連接警告


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.

警告:不建議建立SSL連接而不需要服務器的身份驗證。根據MySQL 5.5.45 +、5.626+和5.7.6+的要求,如果沒有設置顯式選項,默認情況下必須建立SSL連接。對於不使用SSL的現有應用程序,ValuyServer證書屬性設置為“false”。您需要通過設置USESL= false來顯式禁用SSL,或者設置USELS=真,並為服務器證書驗證提供信任存儲。

 

解決辦法:

public static final String DBURL="jdbc:mysql://localhost:3306/yang?verifyServerCertificate=false&useSSL=false";

在連接mysql的url上加上參數:   verifyServerCertificate=false&useSSL=false

 

 

認真看過此篇的小伙伴,如果對你有收獲,請點擊旁邊的小手推薦一下,如果有誤,歡迎指正,謝謝!

版權聲明:此篇為本人原創,轉載請標明出處https://www.cnblogs.com/YQian/p/11171030.html

我的博客園地址:https://www.cnblogs.com/YQian/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM