• mysql中all privileges包含哪些权限


    mysql中all privileges包含哪些权限

    mysql> grant all privileges on test.* to 'ybb'@'%' identified by 'ybb';
    Query OK, 0 rows affected (0.07 sec)
     
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
     
    mysql> select host,user,password from mysql.user where user='ybb' and host='%';
    +-----------+---------+-------------------------------------------+
    | host      | user    | password                                  |
    +-----------+---------+-------------------------------------------+
    | %         | ybb      | *C85EE1EAA8E69C43CE790C4CFFCF1ED2F88039EB |
    +-----------+---------+-------------------------------------------+
    1 rows in set (0.00 sec)
     
    mysql> show grants for ybb;
    +---------------------------------------------------------------------------------------------------+
    | Grants for ybb@%                                                                                   |
    +---------------------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'ybb'@'%' IDENTIFIED BY PASSWORD '*C85EE1EAA8E69C43CE790C4CFFCF1ED2F88039EB' |
    | GRANT ALL PRIVILEGES ON `test`.* TO 'ybb'@'%'                                                      |
    +---------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
     
    mysql> revoke insert on test.* from ybb@'%';
    Query OK, 0 rows affected (0.00 sec)
     
    mysql> show grants for ybb;
    +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Grants for ybb@%                                                                                                                                                                                                    |
    +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'ybb'@'%' IDENTIFIED BY PASSWORD '*C85EE1EAA8E69C43CE790C4CFFCF1ED2F88039EB'                                                                                                                  |
    | GRANT SELECT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `test`.* TO 'ybb'@'%' |
    +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
     
    mysql>

     从上可以看出all privileges包含以下权限:

    select,
    insert,
    update,
    delete,
    create,
    drop,
    references,
    index,
    alter,
    create temporary tables,
    lock tables,
    execute,
    create view,
    show view,
    create routine,
    alter routine,
    event,
    trigger

    感谢

    mysql中all privileges包含哪些权限

  • 相关阅读:
    java中讲讲PrintStream的用法,举例?
    Spark Scala当中reduceByKey的用法
    springboot与ActiveMQ整合
    solr(六): 集群
    zookeeper集群
    solr(五): centos中, 整合 tomcat&solr
    springboot redis(单机/集群)
    redis 五种数据类型
    redis 集群搭建: redis-cluster
    redis 持久化
  • 原文地址:https://www.cnblogs.com/yadongliang/p/14074604.html
一二三 - 开发者的网上家园