Establishing SSL connection without server's identity verification is not recommended.

報錯: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.

1、在tomcat部署的時候發現如上所示的警告,在警告中也給出了明顯的修改提示。這是因爲Mysql數據庫的SSL驗證問題,提示警告不建議使用沒有帶服務器身份驗證的SSL連接,是在MYSQL5.5.45+, 5.6.26+ and 5.7.6+版本中才有的這個問題。如果需要去除該警告,可以再數據庫的配置文件中加上“?useSSL=false”:

jdbc.url=jdbc:mysql://localhost:3306/user?useSSL=false

發佈了35 篇原創文章 · 獲贊 13 · 訪問量 8542
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章