parmeshawar
parmeshawar

Reputation: 13

Access denied for user ''@'localhost' (using password: NO) in mysql

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

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

Upvotes: 1

Views: 13158

Answers (1)

Vincent Duprez
Vincent Duprez

Reputation: 3892

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

Upvotes: 1

Related Questions