ããè¿æ¥MySqlæ°æ®åºï¼ç¨æ·ååå¯ç é½æ¯root
ããString url = "jdbc:mysql://localhost:3306/test" ;
ããString username = "root" ;
ããString password = "root" ;
ããtry{
ããConnection con =
ããDriverManager.getConnection(url , username , password ) ;
ãã}catch(SQLException se){
ããSystem.out.println("æ°æ®åºè¿æ¥å¤±è´¥ï¼");
ããse.printStackTrace() ;
ãã}
温馨提示:内容为网友见解,仅供参考