1

I have been used following command but it was not working.

GRANT ALL PRIVILEGES ON *.* TO ROOT@LOCALHOST IDENTIFIED BY "my_password";
1

1 Answer 1

1

You are not connected (in the way of a login & username) to the database, you need to connect. depending on the way you acces the database. in command line, you can use this:

mysql -pYourpassword -u username
Sign up to request clarification or add additional context in comments.

4 Comments

now Access denied for user 'root'@'localhost' (using password: YES
probably wrong password, have you been able to connect to your db in the past?
yes! i was granting and revoking privileges last day when got problem even i reset password as well as i searched lot on net.
Thats the hard way and will let you make a new password, if this is not a production base, then it could easily solve the problem. Let us know

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.