本文介绍了phpMyAdmin 无法识别 REVOKE 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为我的数据库创建一个具有 read
权限的新用户,然后删除用户的 DROP
权限.
I am attempting to create a new user for my database with read
permissions and then remove the users DROP
permission.
我已经尝试了下面看到的代码,但是,它似乎不起作用.命令 REVOKE
下有一条红色波浪线,错误信息为:
I have tried the code seen below, however, it does not seem to work. A red squiggly line is placed under the command REVOKE
, with the error message :
无法识别的语句类型.(靠近REVOKE
)
我不知道怎么了?
CREATE USER Dave@'localhost' IDENTIFIED BY 'password' ;
GRANT ALL PRIVILEGES ON DB.* TO 'Dave'@'localhost';
REVOKE DROP ON DB.* TO 'Dave'@'localhost';
FLUSH PRIVILEGES;
推荐答案
你REWORK
语法错误.
与 REVOKE
:
REVOKE
priv_type [(column_list)]
[, priv_type [(column_list)]] ...
ON [object_type] priv_level
FROM user_or_role [, user_or_role] ...
所以你想要:
REVOKE DROP ON DB.* FROM Dave'@'localhost';
这篇关于phpMyAdmin 无法识别 REVOKE 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!