当前位置:网站首页>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='%';
边栏推荐
- Canvas record
- hello csdn
- How to use blender to make 360 degree panorama and panoramic video?
- Publish the project online and don't want to open a port
- Learning record XIII
- 2022-07-19: all factors of F (I): I are added up after each factor is squared. For example, f (10) = 1 square + 2 square + 5 square + 10 square = 1 + 4 + 25 + 100 = 130.
- Dc-2-range practice
- FLASH read / write problem of stm32cubemx
- Physical experiment simulation
- Permanently mount the image steps
猜你喜欢

Learning record 12

JS written test question -- realize the flat function of array

Hashcode details

Request and response

Tp5.1 paging (with parameter transfer)

Classic network learning RESNET code implementation

Resolved (the latest version of selenium reported an error) attributeerror: module 'selenium webdriver‘ has no attribute ‘PhantomJS‘

New key points of ES6

The latest interview questions and analysis of software testing in 2022

Mark down learning
随机推荐
How to switch terminators in PostgreSQL?
Backtracking to solve combinatorial problems
Matlab for circular pit
JS interview question - what is the difference between Es5 and ES6?
Flink's study notes
Class notes (4) (2) -- 572. Compete
Time formatting
[stm32f130rct6] idea and code of ultrasonic ranging module
Simulation Implementation of string function (Part 1)
Canvas record
PHP record
Dc-1-practice
Color space (1) - RGB
Ffmpeg 4.3 add custom demuxer
Strategy mode, just read one article
If there is a segment in the encryption field, are you "bronze" or "King"?
[stm32f103rct6] can communication
Daily three questions 7.15
Banana pie bpi-m5 toss record (2) -- compile u-boot
Object.defineproperty use