Im using my root account to login to mysql from a javafx app but im denied with Acces Denied ''@'localhost' (using password: NO). This is my code:
public void ConnnectClicked(ActionEvent e) throws SQLException {
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException ex) {
System.out.println("Error: unable to load driver class!");
System.exit(1);
}
String URL = "jdbc:mysql://localhost:3306/world";
String name = username.getSelectedText();
String pass = password.getSelectedText();
Connection conn = DriverManager.getConnection(URL, name, pass);
primaryStage.setScene(country);
}
As you can see its just a basic connection scheme in javafx. Doenst "password no" means theres something worng with my user account?