必威体育Betway必威体育官网
当前位置:首页 > IT技术

mysql中all privileges包含哪些权限

时间:2019-07-05 09:43:11来源:IT技术作者:seo实验室小编阅读:58次「手机版」
 

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

相关阅读

wampserver中配置虚拟主机时AllowOverride设置为all报

原因:apache没有开启mod_headers.so 或者没有开启mod_rewrite.so解决方法:将httpd.conf中的下面两个配置去掉分号 LoadModule rewr

Centos7 安装并配置walle

Centos7 安装并配置walle 前言: 因为官网的wiki和安装手册 都不是很完整 自己踩了很多坑 最后才弄好。因此记录下来。 官方地址

MySQL数据库审计系统

数据库审计 数据库审计(简称DBAudit)能够实时记录网络上的数据库活动,对数据库操作进行细粒度审计的合规性管理,对数据库遭受到的风

navicat连接mysql8错误1130方案解决

安装MySQL8.0发现用navicat 连接不上MySQL了,大概原因是mysql的root用户的验证方式变了。可以从图下看出root的用户的加密方式为ca

MySQL 高级(事务+索引+视图+触发器+存储过程)

目录 事务 索引 1.创建索引 2.删除索引 3.查看索引 4.索引准则 视图 触发器 存储过程 1.创建存储过程 2.调用存储过程 3.查看存储

分享到:

栏目导航

推荐阅读

热门阅读