im trying to connect to mysql db with java, but im getting this error, "Access denied for user 'root'@'localhost' (using password: YES)" im using mysql 5.7V i tried by changing the password, cleaning the project and more but not solved
i tried this also but didn't work
GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost'
my code:
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/vikas","root","rass");