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/