Properties props =new Properties();
props.put("user", "root");
props.put("password", "root");
props.put("useInformationSchema","true"); //表注释
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://133.96.46.13:3306/test?useUnicode=true&characterEncoding=utf-8", props);
} catch (SQLException e1) {
e1.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
原文链接:https://www.qiquanji.com/post/8362.html
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
微信扫码关注
更新实时通知