- 域名頻道首頁(yè)
- 客服中心
- 常見問(wèn)題
- 空間租用
- 業(yè)務(wù)相關(guān)
- jsp連接mysql數(shù)據(jù)庫(kù)方法
jsp連接mysql數(shù)據(jù)庫(kù)方法
作者:技術(shù)支持來(lái)源:域名頻道發(fā)布時(shí)間:2006-9-15 22:12:10瀏覽:
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicod
e=true&characterEncoding=8859_1"
//myDB為數(shù)據(jù)庫(kù)名
Connection conn= DriverManager.getConnection(url);
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicod
e=true&characterEncoding=8859_1"
//myDB為數(shù)據(jù)庫(kù)名
Connection conn= DriverManager.getConnection(url);