Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean databaseValidation(String address, int port, String username, char[] password) {
- String pw = String.valueOf(password);
- System.out.println(pw);
- try {
- Connection con = DriverManager.getConnection("jdbc:mysql://" + address + ":" + port + "/logctrl?user="
- + "user=" + username + "&password=" + pw );
- } catch (SQLException e) {
- System.out.println("Error connecting to database!");
- e.printStackTrace();
- }
- System.out.println("Connected");
- return true;
- }
- java.sql.SQLException: Access denied for user 'user=root'@'localhost' (using password: YES)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement