当前位置:网站首页>DCL statement of MySQL Foundation
DCL statement of MySQL Foundation
2022-07-04 10:21:00 【Java full stack preacher】
DCL(Data Control Language) sentence : Data control statement .
purpose : Control database 、 surface 、 Field 、 User Access and security levels .
Common keywords :grant、revoke etc.
It is generally used to manage the permissions of databases and users , Learn from practical examples grant( Assign permissions ) and revoke( Take back authority )
Take a common example , This example will be useful in the future
Example : Assign permissions to a user for a database
The database server in a company may run databases of many projects at the same time . therefore , We should be able to Create different users according to different projects , Assign different permissions To manage and maintain the database .
create user 'usertest'@'%' indentified by '123456';
grant all privileges on mydb.* to 'usertest'@'%';
-- View the user's permissions
show grants for 'usertest'@'%';
user usertest Yes mydb The database has all permissions (ALL PRIVILEGES)
Revoke delete permission
revoke delete on mydb.* from 'usertest'@'%'Switch back to the root, Re execution revoke command

-- View the user's permissions
show grants for 'usertest'@'%';
In addition to deleting permissions , Other permissions are . You can also see here , A user has many operation permissions , And these permissions can be assigned independently .
Pay attention to the official account, learn more about the knowledge of the database and get the database free e-book. .

边栏推荐
- 按键精灵跑商学习-商品数量、价格提醒、判断背包
- Kotlin:集合使用
- Idea SSH channel configuration
- Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment
- Exercise 9-1 time conversion (15 points)
- Modules golang
- Custom type: structure, enumeration, union
- 用数据告诉你高考最难的省份是哪里!
- 原生div具有编辑能力
- Use C to extract all text in PDF files (support.Net core)
猜你喜欢

Delayed message center design

Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)

RHCE day 3

leetcode842. Split the array into Fibonacci sequences

C language pointer interview question - the second bullet

If the uniapp is less than 1000, it will be displayed according to the original number. If the number exceeds 1000, it will be converted into 10w+ 1.3k+ display

Hands on deep learning (45) -- bundle search

uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前

uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示

Reasons and solutions for the 8-hour difference in mongodb data date display
随机推荐
Hands on deep learning (41) -- Deep recurrent neural network (deep RNN)
2. Data type
How can Huawei online match improve the success rate of player matching
Hands on deep learning (40) -- short and long term memory network (LSTM)
2020-03-28
【Day1】 deep-learning-basics
Sword finger offer 31 Stack push in and pop-up sequence
Rhcsa day 10 operation
Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 1
BGP advanced experiment
Hands on deep learning (43) -- machine translation and its data construction
Tables in the thesis of latex learning
leetcode1-3
Development guidance document of CMDB
使用 C# 提取 PDF 文件中的所有文字(支持 .NET Core)
Fabric of kubernetes CNI plug-in
Servlet基本原理与常见API方法的应用
Modules golang
Ruby时间格式转换strftime毫秒匹配格式
Application of safety monitoring in zhizhilu Denggan reservoir area