当前位置:网站首页>MySQL的grant语句
MySQL的grant语句
2022-07-31 00:00:00 【Miracle_ze】
grant语句
1.作用:授权
grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利
grant 数据库开发人员,创建表、索引、视图、存储过程、函数等权限。
2.语句格式
grant all【权限】[privileges] on 库.表 用户名@localhost【如果是本地就写这个】identifield by '密码';
1.库.*与库.表区别
1.库.* 是给用户这个库所有表相应的权限,对库中的所有表可以使用授予的权限
2.库.*表是给用户库中指定的表有相应的权限,对库中非指定表不可以使用授予的权限
2.查看 MySQL 用户权限
1.自身权限查看
show grants;
例如:
2.查看其他 MySQL 用户权限
show grants for [email protected];
例如:
3.撤销已经赋予给 MySQL 用户权限的权限。
revoke 跟 grant 的语法差不多,只需要把关键字 to 换成 from 即可:
revoke all【权限】 on *.* from [email protected];
边栏推荐
猜你喜欢
jira是什么
Mysql体系化之JOIN运算实例分析
Shell programming conditional statement test command Integer value, string comparison Logical test File test
HCIP第十五天笔记
uniapp折叠框二级循环
写了多年业务代码,我发现了这11个门道,只有内行才知道
Introducing the visualization tool Netron
Dry goods | 4 tips for MySQL performance optimization
46.<list链表的举列>
2D转换模块&&媒体查询
随机推荐
Data cleaning - ingest using es
2D Transform Module && Media Queries
@requestmapping注解的作用及用法
第一个独立完成的千万级项目
what is jira
【VisDrone数据集】YOLOV4训练VisDrone数据集步骤与结果
乌克兰外交部:乌已完成恢复粮食安全出口的必要准备
Steven Giesel recently published a 5-part series documenting his first experience building an application with the Uno Platform.
What are the efficient open source artifacts of VSCode
uni-ui installation
The difference between ?? and ??= and ?. and || in JS
Calico 网络通信原理揭秘
Mysql体系化之JOIN运算实例分析
天空云变化案例
oracle数据库版本问题咨询(就是对比从数据库查询出来的版本,和docker里面的oracle版本)?
vscode上利用screen命令跑代码
Android security optimization - APP reinforcement
2021GDCPC Guangdong University Student Programming Competition H.History
uniapp折叠框二级循环
HCIP Day 15 Notes