• 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)

  • 相关阅读:
    1-hadoop中遇到的各种异常
    13-hadoop-入门程序
    12-mapReduce的简介和yarn搭建
    11-hdfs-NameNode-HA-wtihQJM解决单点故障问题
    10-hdfs-hdfs搭建
    redis-java-api
    深度学习优化方法
    tf.nn.embedding_lookup()
    tf.variable_scope()和tf.name_scope()
    tf.Variable()、tf.get_variable()和tf.placeholder()
  • 原文地址:https://www.cnblogs.com/w1sh/p/15707556.html
Copyright © 2020-2023  润新知