Java. SQL. SQLException: Access denied for user 'root' @ 'localhost' (using password: YES)
Try again the online methods,
Just for a test code
Class.forname (". Com. Mysql. JDBC Driver ");
The String url="JDBC: mysql://localhost: 3306/mydb";
String name="root";
String password="123456";
The Connection con=DriverManager. GetConnection (url, name, password);
System. The out. Println (con);
Package and guide the
Password must be right, should be have been changed several times
Database with navicat also can see
Database and reinstall had had the latest version to 5.5
The authority had been set, but the root permission to also have no reason to need to set up!
Now good collapse
As a beginner has been card can't go on really collapse
CodePudding user response:
The can't make a dayCodePudding user response:
In database command lineGrant all on *. * to root @ 'localhost' identified by '123456'.
CodePudding user response:
Class loading paths is correct?