当前位置:网站首页>MySQL grant statements
MySQL grant statements
2022-07-31 00:15:00 【Miracle_ze】
grant statement
- 1. Role: Authorization
- 2. Statement format
- The difference between 1.library.* and library.table
- 1.Library.* is to give users the corresponding permissions for all tables in this library, and the granted permissions can be used for all tables in the library
- 2. The library.* table has corresponding permissions for the tables specified in the user library, and the granted permissions cannot be used for non-specified tables in the library
- 2. View MySQL user permissions
- 3. Revoke privileges that have been granted to MySQL user privileges.
1. Role: Authorization
grant general data user, the right to query, insert, update, delete all table data in the database
grant database developer, the authority to create tables, indexes, views, stored procedures, functions, etc.
2. Statement format
grant all[permissions][privileges] on library.table [email protected][if it is local, write this]identifield by 'password';
The difference between 1.library.* and library.table
1.Library.* is to give the user the corresponding permissions for all tables in this library, and the granted permissions can be used for all tables in the library
2. The library.* table has corresponding permissions for the tables specified in the user library, and the granted permissions cannot be used for non-specified tables in the library
2. View MySQL user permissions
1. View by own authority
show grants;
Example:
2. View other MySQL user permissions
show grants for [email protected];
Example:
3. Revoke privileges that have been granted to MySQL user privileges.
revoke has similar syntax to grant, just replace the keyword to with from:
revoke all【Permission】 on *.* from [email protected];
边栏推荐
猜你喜欢
随机推荐
Necessary artifacts - AKShare quants
MPI简谈
在微服务中使用事件溯源的六大原因 - Herath
uni-ui安装
[动态规划] 0-1背包问题和完全背包问题
Shell编程条件语句 test命令 整数值,字符串比较 逻辑测试 文件测试
网络常用的状态码
47.【指针与数组】
After writing business code for many years, I found these 11 doorways, which only experts know
【深度学习】Transformer模型详解
Optimization of aggregate mentioned at DATA AI Summit 2022
Android security optimization - APP reinforcement
mysql 中手动设置事务提交
VSCode高效开源神器有哪些
How to use joiplay emulator
DNS resolution process [visit website]
天空云变化案例
SWM32系列教程6-Systick和PWM
【VisDrone数据集】YOLOV4训练VisDrone数据集步骤与结果
IOT跨平台组件设计方案