当前位置:网站首页>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 (45) -- bundle search
- Custom type: structure, enumeration, union
- Es entry series - 6 document relevance and sorting
- Hands on deep learning (44) -- seq2seq principle and Implementation
- Check 15 developer tools of Alibaba
- Normal vector point cloud rotation
- Rhcsa learning practice
- How to teach yourself to learn programming
- Three schemes of ZK double machine room
- Reasons and solutions for the 8-hour difference in mongodb data date display
猜你喜欢

Pcl:: fromrosmsg alarm failed to find match for field 'intensity'

uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
If you don't know these four caching modes, dare you say you understand caching?

Machine learning -- neural network (IV): BP neural network

Delayed message center design

Hands on deep learning (43) -- machine translation and its data construction

Hands on deep learning (37) -- cyclic neural network

Development guidance document of CMDB

今日睡眠质量记录78分

Hands on deep learning (42) -- bi-directional recurrent neural network (BI RNN)
随机推荐
Summary of reasons for web side automation test failure
Rhcsa learning practice
C language pointer classic interview question - the first bullet
PHP code audit 3 - system reload vulnerability
Rhcsa12
Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 2
Occasional pit compiled by idea
Use C to extract all text in PDF files (support.Net core)
Static comprehensive experiment ---hcip1
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 1
MySQL case
What are the advantages of automation?
2021-08-11 function pointer
Hands on deep learning (41) -- Deep recurrent neural network (deep RNN)
Custom type: structure, enumeration, union
Go context basic introduction
Exercise 7-8 converting strings to decimal integers (15 points)
Golang Modules
Online troubleshooting
Service developers publish services based on EDAs