当前位置:网站首页>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. .
边栏推荐
- Hands on deep learning (40) -- short and long term memory network (LSTM)
- Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 1
- Use C to extract all text in PDF files (support.Net core)
- Check 15 developer tools of Alibaba
- OSPF comprehensive experiment
- Kotlin: collection use
- Basic principle of servlet and application of common API methods
- Exercise 8-7 string sorting (20 points)
- Exercise 9-4 finding books (20 points)
- Latex arranges single column table pictures in double column format articles
猜你喜欢
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
Some summaries of the third anniversary of joining Ping An in China
How can Huawei online match improve the success rate of player matching
RHCE day 3
Devop basic command
OSPF summary
Development guidance document of CMDB
Two way process republication + routing policy
How can people not love the amazing design of XXL job
BGP advanced experiment
随机推荐
Hands on deep learning (36) -- language model and data set
今日睡眠质量记录78分
Tables in the thesis of latex learning
查看CSDN个人资源下载明细
El Table Radio select and hide the select all box
Kotlin:集合使用
The time difference between the past time and the present time of uniapp processing, such as just, a few minutes ago, a few hours ago, a few months ago
六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
Golang type comparison
MySQL case
BGP advanced experiment
Advanced technology management - how to design and follow up the performance of students at different levels
Kotlin 集合操作汇总
Map container
【OpenCV 例程200篇】218. 多行倾斜文字水印
Hands on deep learning (46) -- attention mechanism
Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}
Exercise 9-4 finding books (20 points)
Exercise 9-3 plane vector addition (15 points)
PHP代码审计3—系统重装漏洞