Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // db parameters
- String url = "jdbc:mysql://localhost:3306/mysqljdbc";
- String user = "root";
- String password = "secret";
- Connection conn = null;
- try(conn = DriverManager.getConnection(url, user, password);) {
- // processing here
- } catch(SQLException e) {
- System.out.println(e.getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement