Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public boolean databaseValidation(String address, int port, String username, char[] password) {
  2.  
  3. String pw = String.valueOf(password);
  4. System.out.println(pw);
  5. try {
  6. Connection con = DriverManager.getConnection("jdbc:mysql://" + address + ":" + port + "/logctrl?user="
  7. + "user=" + username + "&password=" + pw );
  8. } catch (SQLException e) {
  9. System.out.println("Error connecting to database!");
  10. e.printStackTrace();
  11. }
  12. System.out.println("Connected");
  13. return true;
  14.  
  15. }
  16.  
  17. java.sql.SQLException: Access denied for user 'user=root'@'localhost' (using password: YES)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement