大佬看下JDBC连接mysqll数据出现的这个问题

轻语z 2017-11-08 08:07:04


public class jdbc3 {

public static void main(String[] args) {
// TODO 自动生成的方法存根

try {
Connection conn=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/helloworld","root","514730");
Statement st =(Statement) conn.createStatement();
ResultSet rs=st.executeQuery("select*from student");

while(rs.next()) {
System.out.println(rs.getString("last_name")+rs.getString("first_name"));
}


} catch (Exception e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}

}
Wed Nov 08 08:03:52 CST 2017 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.

结果Doejohn
Kobebryant
kulijack


能够得到运算结果,不知道红色信息上面什么意思
...全文
131 回复 点赞 打赏 收藏 举报
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
相关推荐
发帖
Java SE
加入

6.2w+

社区成员

Java 2 Standard Edition
申请成为版主
帖子事件
创建了帖子
2017-11-08 08:07
社区公告
暂无公告