标签:pre driver etc 数据 info tst exception generated png
//加载驱动 //oracal.jdbc.drive.Oracle.Driver //com.mysql.jdbc.Driver try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } Connection connection = null; try { connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/superlee", "Lee", "6666"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(connection);
error:
错误原因: 连接的数据库名错误或连接的数据库未创建(不存在)。
标签:pre driver etc 数据 info tst exception generated png
原文地址:https://www.cnblogs.com/hsomelee/p/9047008.html