String url = "jdbc:mysql://10.0.1.123:3306/cadmin_hucheng?autoReconnect=true&useUnicode=true&characterEncoding=utf-8";
String userName = "root";
String password = "hskj2015";
String driver = "com.mysql.jdbc.Driver";
try {
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, userName, password);
PreparedStatement p = conn.prepareStatement("insert into stu(name) values('测试》》》')");
p.executeUpdate();
p.close();
conn.close();
System.out.println(">>>>>>结束");
} catch (Exception e) {
throw new ExceptionInInitializerError(e);
}