当前位置:网站首页>MySQL - user management
MySQL - user management
2022-06-21 13:36:00 【Longbow dog learning C】
If we only use root user , There will be security risks .

1. user
1. User information
MySQL Users in , Are stored in the system database mysql Of user In the table .

- host: Indicates which host this user can log in from , If it is localhost, Indicates that you can only log in from this computer
- user: user name
- authentication_string: The user password passes password Function after encryption
2. Create user
create user ' user name '@' Landing host /ip' identified by ' password ';

3. Delete user
drop user ' user name '@' Host name '

4. Change user password
set password=password(' The new code '); // Change your password
set password for ' user name '@' Host name '=password(' The new code '); //root The user changes the password of the specified user
2. Database permissions

1. Authorize users
The newly created user does not have any permissions , The user needs to be authorized .
grant Permission list on library . Object name to ' user name '@' Landing location ' [identified by ' password ']
- *.* : All objects representing all databases in the system ( surface , View , Stored procedure, etc )
- library .* : Represents all data objects in a database ( surface , View , Stored procedure, etc )
- identified by Optional . If the user exists , Change the password while giving permission , If the user does not exist , It's about creating users


2. Recycling permissions
revoke Permission list on library . Object name from ' user name '@' Landing location ';

边栏推荐
- Summary of the latest remote deployment O & M tools
- seaborn绘图风格的设置
- Cvpr2022 | the action sequence verification task was first proposed by X xiaohongshu of Shanghai University of science and technology, which can be applied to multiple scenarios such as scoring of spo
- 4. procedure flow structure
- Isn't this another go bug?
- 8 most common SQL error usages
- 塔米狗 热门资讯:厦门产权交易中心再创第一次!
- Atguigu---- conditional rendering
- 应用配置管理,基础原理分析
- 百度交易中台之钱包系统架构浅析
猜你喜欢

《网络是怎么样连接的》读书笔记 - ADSL

Nanjing University static program analyses -- Introduction learning notes

【深入理解TcaplusDB技术】Tmonitor系统升级

Eureka的TimedSupervisorTask类(自动调节间隔的周期性任务)

Kube Prometheus grafana installation plug-in and grafana image renderer

Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection

分布式事务处理方案大 PK

Is the live interactive function of the applet running in the app?

Distributed transactions, simple in principle, are all pits in writing

5000 word analysis: the way of container security attack and defense in actual combat scenarios
随机推荐
scrapy_redis分布式爬虫
Test the interface between app and wechat applet
2. reference
Use map set or list set to store list set
Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
如何使用搜索引擎?
C language elementary level (IX) enumeration
3. operator
5000 word analysis: the way of container security attack and defense in actual combat scenarios
Apache shardingsphere 5.1.2 release | new driving API + cloud native deployment to create a high-performance data gateway
Kotlin - sequence sequence
3D slicer saves segmentation results
AGCO AI frontier promotion (6.21)
###数据库的高可用配置(mysql)
Open source FTP server FileZilla server
seaborn绘图风格的设置
Eureka's timedsupersortask class (periodic task with automatic interval adjustment)
Kube-prometheus grafana安装插件和grafana-image-renderer
居家办公初体验之新得分享| 社区征文
JS 中的集合引用类型