当前位置:网站首页>Chapter IX user and authority
Chapter IX user and authority
2022-04-22 04:55:00 【Liang Yunliang】
9.1 Identity Authentication
(1)IP+ User name as authentication
for example :
root@localhost: Use only on this machine root The user login
root@%: Run on any machine root The user login
[email protected]: Only run on 192.168.11.56 Use on main engine root The user login
gjz@%: Run on any machine gjz The user login
When creating users , Used for authentication IP Address , It's connected to the client of your service IP Address
for example :[email protected], Indicates that the client is in 192.168.11.56 You can access your mysql service
And this client , To connect to your service ,-h Back of the mainframe IP The address is , Of the machine where the server is located IP Address .
for example :mysql The service is 192.168.11.11 On the machine , The client is in 192.168.11.56 On , So the client can use [email protected] or root@%, Fill in when connecting mysql -h192.168.11.11 -u root -p password
(2) password
9.2 Assign permissions
1、 User rights include 4 Permission levels
(1) overall situation
(2) database
(3) surface
(4) Field
Check permissions in turn , If the front passes , There will be no verification later :
overall situation > database > surface > Field
Be careful :root@localhost, This user always retains all global permissions .
2、 Account permissions
show grants for ' user name '@' host IP Address ';
3、 New users and delete users


The corresponding statement :
CREATE USER ' user name '@' host IP Address ' IDENTIFIED BY '123456';
If the host IP Address :(1)192.168.29.53, Only when IP Sign in
(2)%, It means that you can start at any time IP Sign in
drop user ' user name '@' host IP Address ';
4、 Granting and withdrawing authority

Corresponding statement :
GRANT Permission list ON *.* TO ' user name '@' host IP Address '; # overall situation
GRANT Permission list ON Database name .* TO ' user name '@' host IP Address '; # A library
GRANT Permission list ON Database name . form TO ' user name '@' host IP Address '; # A table of a library
GRANT Permission list ON Table name .* TO ' user name '@' host IP Address '; # The fields of a table
for example :
GRANT SELECT ON *.* TO 'gao'@'192.168.29.53';
GRANT SELECT ON `test`.* TO 'gao'@'192.168.29.53';
GRANT UPDATE ON `test`.`t_department` TO 'gao'@'192.168.29.53';
GRANT UPDATE ON `t_department`.* TO 'gao'@'192.168.29.53';
GRANT SELECT (tid), INSERT (tid), UPDATE (tid), REFERENCES (tid) ON `1101db`.`course` TO 'gao'@'192.168.29.30';
Take back authority :
revoke Permission list ON *.* from ' user name '@' host IP Address ';
revoke Permission list ON Database name .* from ' user name '@' host IP Address ';
revoke Permission list ON Database name . form from ' user name '@' host IP Address ';
revoke Permission list ON Table name .* from ' user name '@' host IP Address ';
版权声明
本文为[Liang Yunliang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210738414164.html
边栏推荐
- PHP quickly raises a value in a two-dimensional array to an array key value, array_ The wonderful use of column
- 【图像分割综述】Image Segmentation Using Deep Learning: A Survey
- POJ - 2456 aggressive cows
- Cloud network integration - computing power center - roce / rmda and nvme / nvme of
- [chestnut sugar GIS] SuperMap - how to create hyperlinks for data
- 2022.04.20华为笔试
- Inotify简述
- Image segmentation using deep learning: a survey
- 【Pytorch】Tensor. Use and understanding of continguous()
- Queue summary (Part I)
猜你喜欢
![[selenium] yaml data driven](/img/a1/721b2414b62a940ae1a0dd95046322.png)
[selenium] yaml data driven

What is the difference between two-dimensional convolution kernel and three-dimensional convolution kernel in convolution neural network?

Autojs automation script how to develop on the computer, detailed reliable tutorial!!!

Application of an open current transformer with switching value

Kaggle actual combat 4.1 -- time series prediction problem

JVM - G1 garbage collector

Discussion on data set division

不同品牌设备如何兼容实现互联?一文教你看懂

Prediction of KNN Iris species after normalization and standardization

6. Comparable to JMeter Net pressure measurement tool - crank practical chapter - collecting diagnosis tracking information and how to analyze bottlenecks
随机推荐
Error encountered when installing opencv
6. Comparable to JMeter Net pressure measurement tool - crank practical chapter - collecting diagnosis tracking information and how to analyze bottlenecks
Iris species prediction -- Introduction to data set
[chestnut sugar GIS] ArcMap - how to combine multiple images into one
Application of an open current transformer with switching value
2022.04.20华为笔试
kaggle实战4.1--时间序列预测问题
Image segmentation using deep learning: a survey
Transaction isolation level and mvcc
Not sure whether it is a bug or a setting
Leetcode refers to offer 18 Delete the node of the linked list
Les racines et le contexte de Carina
[selenium] basic application of unittest testing framework
Vue project NPM run build when packaging the project, time stamp the version number of CSS and JS files to prevent the browser from caching
2022 Shandong Province safety officer C certificate examination questions and online simulation examination
Inotify简述
Feature Engineering - feature preprocessing (normalization, standardization)
Full version operation process Jetson installs the latest opencv
win10卡顿修复
Use specified graphics card