zoukankan      html  css  js  c++  java
  • MySQL权限回收

    1.查看系统用户
    mysql> select user,host from mysql.user;
    +---------------+-----------+
    | user | host |
    +---------------+-----------+
    | root | 10.0.0.% |
    | wish | 10.0.0.% |
    | wish01 | 10.0.0.% |
    | wish02 | 10.0.0.% |
    | mysql.session | localhost |
    | mysql.sys | localhost |
    | root | localhost |
    +---------------+-----------+
    7 rows in set (0.00 sec)

    2.查看用户权限
    查看wish02用户的权限
    mysql> show grants for wish02@'10.0.0.%';
    +--------------------------------------------------------------------------------------+
    | Grants for wish02@10.0.0.% |
    +--------------------------------------------------------------------------------------+
    | GRANT SELECT, INSERT, UPDATE, DELETE ON . TO 'wish02'@'10.0.0.%' WITH GRANT OPTION |
    +--------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)

    3.回收权限
    回收wish02用户delete权限
    mysql> revoke delete on . from 'wish02'@'10.0.0.%';
    Query OK, 0 rows affected (0.00 sec)

    再次查看wish02用户的权限,可以看到delete权限被回收了
    mysql> show grants for wish02@'10.0.0.%';
    +------------------------------------------------------------------------------+
    | Grants for wish02@10.0.0.% |
    +------------------------------------------------------------------------------+
    | GRANT SELECT, INSERT, UPDATE ON . TO 'wish02'@'10.0.0.%' WITH GRANT OPTION |
    +------------------------------------------------------------------------------+
    1 row in set (0.00 sec)

  • 相关阅读:
    Exp9 Web安全基础
    EXP8 Web基础
    Exp7 网络欺诈防范
    Exp6 信息搜集与漏洞扫描
    Exp5 MSF基础应用
    Exp4 恶意代码分析
    Exp3 免杀原理与实践
    Exp2 后门原理与实践 20154317
    正则表达Regex替换标签
    正则表达式
  • 原文地址:https://www.cnblogs.com/w1sh/p/15707556.html
Copyright © 2011-2022 走看看