Click here to Skip to main content
16,018,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here I have this error

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

if I execute this thing

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION;

then I have this error.

ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)
Posted
Comments
Max Methot 16-Sep-15 8:13am    
Are you running your grant command as the root user (mysql -u root -p) ?

This -> (using password: NO) is telling me you are trying to give root access to a user without being root or wihout proper permission.
Member 9671810 16-Sep-15 23:40pm    
I reinstalled MySQL sever, and now it works for me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900