zoukankan      html  css  js  c++  java
  • 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
    

      

  • 相关阅读:
    软件需求,概要设计,详细设计(文档)
    需求文档和设计文档的区别
    Sqlyog和Navicat——mysql数据库图像化管理工具,
    Sqlyog 和Navicat
    端口占用问题
    List集合
    JSON——(JavaScript Object Notation, JS 对象简谱) 数据交换格式。JSON是一个序列化的对象或数组。
    Excel图表导出高清矢量位图片并裁剪的方法
    使用福昕PDF编辑器裁剪PDF页面
    Latex模板默认两栏的分栏的情况下怎么让图片和表格占一栏显示
  • 原文地址:https://www.cnblogs.com/abclife/p/5789808.html
Copyright © 2011-2022 走看看