当前位置:网站首页>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];
边栏推荐
猜你喜欢
随机推荐
Steven Giesel 最近发布了一个由5部分内容组成的系列,记录了他首次使用 Uno Platform 构建应用程序的经验。
vscode上利用screen命令跑代码
软考学习计划
MPI简谈
transition transition && animation animation
Machine Learning 1-Regression Model (2)
The performance management method OKR is used by all companies
2D转换模块&&媒体查询
PS Basic Learning (1)
The difference between ?? and ??= and ?. and || in JS
Axure Carousel
Ukraine's foreign ministry: wu was restored to complete the export of food security
Oracle一个诡异的临时表空间不足的问题
软件开发设计流程
How to Repair Word File Corruption
Encapsulate and obtain system user information, roles and permission control
Calico 网络通信原理揭秘
HCIP第十五天笔记
雪佛兰开拓者,安全保障温暖你的家庭出行的第一选择
mysql中关于存储过程无法实现迁移复制表中数据问题