我在mysql中制作一个简单的Grant,但想知道下面代码有什么问题。
GRANT ALL PRIVILEGES
ON name_database.*
TO 'root'@'localhost'
IDENTIFIED BY PASSWORD 'password';
为什么我不断收到如下错误消息:
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
答案 0 :(得分:1)
尝试:
GRANT ALL PRIVILEGES
ON name_database.*
TO 'root'@'localhost'
IDENTIFIED BY 'password'; /*<--- no PASSWORD KEYWORD*/