MySQL 警告WARN: Establishing SSL connection without server's identity verification is not recommended.解決辦法

Success loading Mysql Driver!

Mon Apr 04 15:43:00 CST 2016 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.

Success connect Mysql server!

首先恭喜,出現(xiàn)這個(gè)的時(shí)候MySQL說明已經(jīng)安裝成功了,這是警告不是錯(cuò)誤,以后使用是不影響的。大概的意思就是說建立ssl連接,但是服務(wù)器沒有身份認(rèn)證,這種方式不推薦使用。

解決辦法:

原來的連接url:Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "letmein");

現(xiàn)在的連接url:Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false","root", "letmein");

// 連接URL為 jdbc:mysql//服務(wù)器地址/數(shù)據(jù)庫名 ,后面的2個(gè)參數(shù)分別是登陸用戶名和密碼

如有轉(zhuǎn)載請請務(wù)必保留此出處:http://www.cnblogs.com/xiangyangzhu/

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

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

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