Advertisement
Guest User

Untitled

a guest
Jan 8th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.         try{
  2.             Class.forName("com.mysql.jdbc.Driver");
  3.             _connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdb?user=root&password=pass&useSSL=false");
  4.         } catch (SQLException ex) {
  5.             System.out.println(ex.getMessage());
  6.         } catch (ClassNotFoundException ex) {
  7.             System.out.println("Class not found: " + ex.getMessage());
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement