授予所有语法

时间:2013-01-26 14:45:57

标签: mysql

这不起作用:

use mysql

GRANT ALL ON *.* TO 'root'@'192.168.1.2'

也不是

use mysql

GRANT ALL ON *.* TO 'root'@'192.168.1.2' IDENTIFIED BY 'password'

这是我得到的错误:

#1064 - 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 'GRANT ALL ON *.* TO 'root'@'192.168.1.2'' at line 3

我在服务器版本5.5.8上。怎么了?

1 个答案:

答案 0 :(得分:1)

试试这个:

use mysql

GRANT ALL ON *.* TO 'root@192.168.1.2' IDENTIFIED BY 'password'