Reputation: 1642
I am making a simple Grant in mysql, but wondering what is wrong with the below code.
GRANT ALL PRIVILEGES
ON name_database.*
TO 'root'@'localhost'
IDENTIFIED BY PASSWORD 'password';
Why I constantly get the error message like:
ERROR 1064 (42000): You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right
syntax to use near
Upvotes: 0
Views: 1175
Reputation: 8528
Try :
GRANT ALL PRIVILEGES
ON name_database.*
TO 'root'@'localhost'
IDENTIFIED BY 'password'; /*<--- no PASSWORD KEYWORD*/
Upvotes: 1