Guest User

Untitled

a guest
Oct 5th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. private static final String USERNAME= "root";
  2. private static final String PASSWORD= "root";
  3. private static final String CONN_STRING= "jdbc:mysql//localhost:3306/java";
  4.  
  5. conn Connection = null;
  6.  
  7. try{
  8. conn = DriverManager.getConnection(CONN_STRING, USERNAME, PASSWORD);
  9. System.out.println("Connected");
  10. }catch (SQLException e){
  11. System.err.println(e);
  12. }
Add Comment
Please, Sign In to add comment