当前位置:网站首页>mysql_ Account authorization permission recycling, account locking and unlocking, account creation and deletion
mysql_ Account authorization permission recycling, account locking and unlocking, account creation and deletion
2022-07-25 03:01:00 【angela_ dba_ chao】
1 Create account
CREATE USER 'useraccount'@'%' IDENTIFIED BY 'password';
2 Account empowerment
GRANT ALL ON *.* TO 'useraccount'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3 View account permissions
show grants for [email protected]`%`;
4 Account permission withdrawal
revoke all privileges on *.* from `useraccount`@`%`;
5 Lock account
ALTER USER 'useraccount'@'%' ACCOUNT LOCK;
6 Check whether the account is unlocked
SHOW CREATE useraccount
select host,user,account_locked from mysql.user where user in ('useraccont');
7 Unlock account
ALTER USER [IF EXISTS] useraccount ACCOUNT UNLOCK;
8 Delete the account
drop user useraccount;
delete from user where user='useraccount' and host='%';
边栏推荐
- JS foundation -- regular expression
- Riotboard development board series notes (VIII) -- building desktop system
- JS foundation -- JSON
- 6.0 cancellation of member registration verification code
- Uni app configuration
- MySQL common function summary, very practical, often encountered in interviews
- Learning Record V
- "Introduction to interface testing" punch in to learn day07: websocket interface: how to test a completely unfamiliar protocol interface?
- It7259q-13, it7259ex-24 feature wearable devices
- Read and upgrade st-link chip information and SWD burning media through STM32 stlink utility tool
猜你喜欢

Beginners must see the markdown User Guide

Learning record 10

Pagoda workman WSS reverse proxy socket legal domain name applet chat remove port

Define macros in makefile and pass them to source code

How to use blender to make 360 degree panorama and panoramic video?

Riotboard development board series notes (VII) -- the use of framebuffer

Study notes of filebeat

Sequence diagram of UML diagram series

Is redis'module'not an internal or external command?

Win10 -- open the hosts file as an administrator
随机推荐
Tp5.1 initialize initialization method (not \u initialize)
The latest interview questions and analysis of software testing in 2022
"Introduction to interface testing" punch in to learn day05: how can a testing framework support restful interfaces?
SQL Server 2022 installation
【C】 Advanced knowledge of file operation
Unity refers to a variable in another class (its own instance)
Tp5.1 paging (with parameter transfer)
Rotating frame target detection mmrotate v0.3.1 training hrsc2016 data set (II)
Color space (2) -- YUV
[Kali's sshd service is enabled]
Solve ''_ Xsrf 'argument missing from post
Riotboard development board series notes (VII) -- the use of framebuffer
Use of stm32cubemonitor Part II - historical data storage and network access
Time formatting
# CF #808 Div.2(A - C)
[jailhouse article] certify the uncertified rewards assessment of virtualization for mixed criticality
Concurrent programming day01
Arduino + si5351 square wave generator
# CF #807 Div.2(A - D)
Daily three questions 7.19