当前位置:网站首页>mysql_账号授权权限回收、账号锁定解锁、账号创建删除
mysql_账号授权权限回收、账号锁定解锁、账号创建删除
2022-07-20 05:31:00 【angela_dba_chao】
1 创建账号
CREATE USER 'useraccount'@'%' IDENTIFIED BY 'password';
2 账号赋权
GRANT ALL ON *.* TO 'useraccount'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3 查看账号权限
show grants for [email protected]`%`;
4 账号权限收回
revoke all privileges on *.* from `useraccount`@`%`;
5 锁定账号
ALTER USER 'useraccount'@'%' ACCOUNT LOCK;
6 查看帐户是否已解锁
SHOW CREATE useraccount
select host,user,account_locked from mysql.user where user in ('useraccont');
7 解锁账号
ALTER USER [IF EXISTS] useraccount ACCOUNT UNLOCK;
8 删除账号
drop user useraccount;
delete from user where user='useraccount' and host='%';
边栏推荐
猜你喜欢
从输入URL到页面展示
一文了解 NebulaGraph 上的 Spark 项目
【学习笔记之菜Dog学C】函数递归
The practical operation of multi category risk scoring data helps you stabilize your small, medium and micro businesses
[dish of learning notes dog learning C] detailed array name
Transform streams into data products
Chrome 进程架构
文件权限管理
P7354 "pmoi-1" Knight chess
直接插入排序/希尔排序
随机推荐
【个人总结】2022.7.17周结
[dish of learning notes dog learning C] data storage
dom——操作文档树及其案例
The practical operation of multi category risk scoring data helps you stabilize your small, medium and micro businesses
C. Mark and His Unfinished Essay
2022-07-19-use shell to activate CONDA environment
试题 B: 顺子日期
[dish of learning notes, dog learning C] minesweeping game
Rpc:thrift framework
OpenLayers Draw绘制时删除最后一个点
【学习笔记之菜Dog学C】循环语句
使用 poi 导入导出
【C】 Introduction to C language
koa2 接收不到post方法提交的formData数据(值: {})
Tips for using Visual Studio shortcut keys
[dish of learning notes dog learning C] if branch statement and switch branch statement
【学习笔记之菜Dog学C】详解数组名
Ctfshow web entry information collection WP (1-20) (detailed explanation)
Graduation season -- use technology of various application scenarios
list类型转String类型