当前位置:网站首页>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];
边栏推荐
- ZZULIOJ:1119: sequence order
- 乌克兰外交部:乌已完成恢复粮食安全出口的必要准备
- 软件测试三阶段,你在哪一步?
- Necessary artifacts - AKShare quants
- Ukraine's foreign ministry: wu was restored to complete the export of food security
- Data cleaning - ingest using es
- How to adjust Chinese in joiplay simulator
- [Meng Xin problem solving] Delete the Nth node from the bottom of the linked list
- Reverse linked list - head insertion inversion method
- SWM32系列教程6-Systick和PWM
猜你喜欢

动态修改el-tab-pane 的label(整理)

递增三元组

Bugku sql注入

在微服务中使用事件溯源的六大原因 - Herath

CPM:A large-scale generative chinese pre-trained lanuage model

Encapsulate and obtain system user information, roles and permission control

PS Basic Learning (1)

How to Repair Word File Corruption
Dry goods | 4 tips for MySQL performance optimization

Android安全性优化——APP加固
随机推荐
Ukraine's foreign ministry: wu was restored to complete the export of food security
数据清洗-使用es的ingest
HashSet源码解析
CPM:A large-scale generative chinese pre-trained lanuage model
第一个独立完成的千万级项目
A Brief Talk About MPI
Point Cloud Scene Reconstruction with Depth Estimation
joiplay模拟器rtp如何安装
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
Data cleaning - ingest using es
WebServer process explanation (registration module)
实验8(vlan实验)
Manually set transaction commit in mysql
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
H5跳转微信公众号解决方案
ZZULIOJ: 1120: the most value to exchange
Shell编程条件语句 test命令 整数值,字符串比较 逻辑测试 文件测试
Mysql体系化之JOIN运算实例分析
Oracle一个诡异的临时表空间不足的问题
ABC 261 F - Sorting Color Balls(逆序对)