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

边栏推荐
- Huawei cloud releases desktop ide codearts
- 【深入理解TcaplusDB技术】Tmonitor系统升级
- seaborn绘图风格的设置
- Voltage detection and current detection based on stm32
- scrapy_redis分布式爬虫
- Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
- [in depth understanding of tcapulusdb technology] tcapulusdb business data backup
- Collection reference type in JS
- cartographer_ ceres_ scan_ matcher_ 2d
- Isn't this another go bug?
猜你喜欢

5000 word analysis: the way of container security attack and defense in actual combat scenarios

SCCM基于已安装的 APP创建客户端集合并定期推送应用更新

Iclr2022 | training billion level parameter GNN for molecular simulation
![[in depth understanding of tcapulusdb technology] tcapulusdb business data backup](/img/74/dcb7cfefd258fa17573c96a6e78323.png)
[in depth understanding of tcapulusdb technology] tcapulusdb business data backup

C language elementary level (IX) enumeration

Apache ShardingSphere 5.1.2 发布|全新驱动 API + 云原生部署,打造高性能数据网关
MySQL constraints (descriptions of various conditions when creating tables)

The xdd-plus login prompt on the Qinglong panel is "the current login environment is abnormal. To ensure the security of your account, you cannot log in temporarily. It is recommended to connect the t

Apache shardingsphere 5.1.2 release | new driving API + cloud native deployment to create a high-performance data gateway

Babbitt yuancosmos daily must read: wechat may ban a official account for the first time on the grounds of "involving secondary transactions in digital collections", and the new regulations of the pla
随机推荐
修修补补一时爽,果断重构有担当——聊聊CRM分布式缓存优化
1. memory partition model
The xdd-plus login prompt on the Qinglong panel is "the current login environment is abnormal. To ensure the security of your account, you cannot log in temporarily. It is recommended to connect the t
3D slicer saves segmentation results
C language elementary order (VI) function
Explanation of common mesh generation methods in workbench
[Anxin cup 2019]easy_ web-1
Application configuration management, basic principle analysis
May the mountains and rivers be safe
Hot information of Tami dog: Xiamen property right trading center creates its first time again!
如何使用搜索引擎?
【深入理解TcaplusDB技术】Tmonitor系统升级
Are you still using generator to generate crud code of XXX management system? Let's see what I wrote
5000 word analysis: the way of container security attack and defense in actual combat scenarios
###数据库的高可用配置(mysql)
Memcached (high performance memory object cache)
Test the interface between app and wechat applet
【深入理解TcaplusDB技术】TcaplusDB业务数据备份
Kotlin - sequence sequence
居家辦公初體驗之新得分享| 社區征文