我想在mysql中撤消用户在特定表上的插入 我之前尝试过这段代码:
use varian_db;
REVOKE INSERT ON 'gevhm_users' FROM 'varian_user';
但是mysql返回了这个错误:
#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 ''gevhm_users' FROM 'varian_user'' at line 1
请帮忙。
答案 0 :(得分:0)
在向/从此用户授予或撤消权限时,您必须指定数据库名称和表名的完整路径。并以正确的格式编写用户名。你的陈述应该是这样的:
REVOKE INSERT ON varian_db.gevhm_users FROM 'varian_user'@'user_ip_address';
FLUSH PRIVILEGES;
更多信息:MySQL Revoke Syntax