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();}
700字范文,内容丰富有趣,生活中的好帮手!