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(); }