Advertisement
Guest User

Untitled

a guest
Jan 7th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. public Connection getConnection() throws SQLException {
  2.     try {
  3.         Class.forName("com.mysql.jdbc.Driver");
  4.     } catch (ClassNotFoundException e) {
  5.         throw new SQLException(e);
  6.     }
  7.    
  8.     return DriverManager.getConnection("jdbc:mysql://localhost/dbtest",
  9.             "root", "acesarl@2019");
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement