Class.forName("com.mysql.jdbc.Driver");String url = "jdbc:mysql://localhost:3306/bookDB";String user = "root";String pass = "root";Connection con = DriverManager.getConnection(url, user, pass);
你试一下