1.myeclipse 使用 mysql jar 包 放到 web-inf目录下的lib 自动解压
2.jdbc连接mysql大致代码:
Class.forname();
con=DriverManager.getConnection(url,user,pwd);
Statement st =com.createStatement();
ResultSet rs = st.executQuery(sql);
String name=null;
while(rs.next()){
name=rs.getString("username");
System.out.println(name);
}
st.close();
con.close();