共计 392 个字符,预计需要花费 1 分钟才能阅读完成。
移除权限
REVOKE 命令
只保留 SELECT 权限
命令阐明:REVOKE [权限列表,] ON {库名}.{表明} FROM ‘{用户名}’@'{host}’REVOKE INSERT,UPDATE,DELETE,CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON product.* FROM'guest'@'localhost'
刷新权限 flush privileges;
# 查看权限列表
SHOW GRANTS FOR 'woo_product'@'%';
GRANT USAGE ON *.* TO 'guest'@'%'
GRANT SELECT ON `product`.* TO 'guest'@'%'
正文完