Naishu Babu
Naishu Babu

Reputation: 61

Grant command syntax error

I get a syntax error when I run this command:

GRANT ALL PRIVILEGES ON  *.* TO 'root'@'%' IDENTIFIED BY 'password';

Upvotes: 1

Views: 718

Answers (2)

user9801595
user9801595

Reputation:

You only need to declare your instruction as follows

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';

You don´t need to use IDENTIFIED BY instruction because that command corresponds to

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

Upvotes: 2

user8406805
user8406805

Reputation:

Simply use the as below it should work for you :

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';

Upvotes: 1

Related Questions