删除权限
代码语言:javascript复制REVOKE ALL PRIVILEGES ON `8oh`.* FROM '8oh'@'%'; GRANT USAGE ON `8oh`.* TO '8oh'@'%';
除了Grant权限赋予:
代码语言:javascript复制REVOKE ALL PRIVILEGES ON `8oh`.* FROM '8oh'@'%'; GRANT ALL PRIVILEGES ON `8oh`.* TO '8oh'@'%';
移除Grant权限
代码语言:javascript复制REVOKE ALL PRIVILEGES ON `8oh`.* FROM '8oh'@'%'; REVOKE GRANT OPTION ON `8oh`.* FROM '8oh'@'%'; GRANT ALL PRIVILEGES ON `8oh`.* TO '8oh'@'%';
赋予只读权限
代码语言:javascript复制GRANT SELECT, DELETE, SHOW VIEW ON `8oh`.* TO '8oh'@'%';
其实就是移除了所有权限然后再根据需求重新赋予权限