请问是什么原因导致数据库连接失败的,mysql密码不正确会导致连接失败吗
把错误打印出来
try { } catch (Exception e) { System.out.println("数据库连接失败"); e.printStackTrace(); }