Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- String url = "jdbc:mysql://localhost:3306/dbname";
- Connection con = DriverManager.getConnection(url, "test", "test");
- } catch (SQLException ex) {
- System.out.println("SQLException: " + ex.getMessage());
- System.out.println("SQLState: " + ex.getSQLState());
- System.out.println("VendorError: " + ex.getErrorCode());
- }
- Class.forName("com.mysql.jdbc.Driver");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement