在Struts中不能插入数据到Mysql中请大家帮我看看:String name = insertdbForm.getUname() ;try { Class.forName("com.mysql.jdbc.Driver"); Connection conn = DriverManager.getConnection(
"jdbc:mysq1://localhost:3306/yf", "root", "123456"); PreparedStatement ps = conn
.prepareStatement("insert into reg values(?)"); ps.setString(1, name);
ps.execute() ; ps.close();
conn.close();
} catch (Exception e) {
// TODO: handle exception
}
"jdbc:mysq1://localhost:3306/yf", "root", "123456"); 你写的好像是jdbc:mysq1 JDBC:MYSQL