当前位置:网站首页>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. .

边栏推荐
- 今日睡眠质量记录78分
- Hands on deep learning (39) -- gating cycle unit Gru
- Development guidance document of CMDB
- Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)
- Introduction to extensible system architecture
- Application of safety monitoring in zhizhilu Denggan reservoir area
- Machine learning -- neural network (IV): BP neural network
- System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
- 用数据告诉你高考最难的省份是哪里!
- Hands on deep learning (44) -- seq2seq principle and Implementation
猜你喜欢

Idea SSH channel configuration

Rhsca day 11 operation

【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法

Latex learning insertion number - list of filled dots, bars, numbers

Rhcsa day 10 operation

MongoDB数据日期显示相差8小时 原因和解决方案

Fabric of kubernetes CNI plug-in

A little feeling

Hands on deep learning (45) -- bundle search

Matlab tips (25) competitive neural network and SOM neural network
随机推荐
Normal vector point cloud rotation
MongoDB数据日期显示相差8小时 原因和解决方案
【Day2】 convolutional-neural-networks
Hands on deep learning (42) -- bi-directional recurrent neural network (BI RNN)
Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)
System.currentTimeMillis() 和 System.nanoTime() 哪个更快?别用错了!
system design
用数据告诉你高考最难的省份是哪里!
Intelligent gateway helps improve industrial data acquisition and utilization
AUTOSAR从入门到精通100讲(106)-域控制器中的SOA
Fabric of kubernetes CNI plug-in
Button wizard business running learning - commodity quantity, price reminder, judgment Backpack
Basic principle of servlet and application of common API methods
Exercise 7-4 find out the elements that are not common to two arrays (20 points)
查看CSDN个人资源下载明细
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
7-17 crawling worms (15 points)
【OpenCV 例程200篇】218. 多行倾斜文字水印
Application of safety monitoring in zhizhilu Denggan reservoir area
Laravel文档阅读笔记-How to use @auth and @guest directives in Laravel