DCL操作(MySQL)

  1. zhangsan用户可以从任何ip连接
GRANT SELECT,INSERT,UPDATE,SELECT ON test.* to zhangsan@'%' IDENTIFIED BY '123';
  1. zhangsan用户可以从本地执行所有权限
GRANT ALL PRIVILEGES ON *.* to zhangsan@'localhost' IDENTIFIED BY '123';
  1. 权限回收
REVOKE SELECT ON *.* FROM zhangsan@localhost
  1. 刷新权限
FLUSH PRIVILEGES;
    原文作者:蚂蚁窝大梦想
    原文地址: https://www.jianshu.com/p/0242ecffe05f
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞