Advertisement
joseleonweb

Untitled

May 12th, 2021
656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. // db parameters
  2. String url       = "jdbc:mysql://localhost:3306/mysqljdbc";
  3. String user      = "root";
  4. String password  = "secret";
  5.  
  6. Connection conn = null;
  7.  
  8. try(conn = DriverManager.getConnection(url, user, password);) {
  9.     // processing here
  10. } catch(SQLException e) {
  11.    System.out.println(e.getMessage());
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement