mysql8创建用户
程序员文章站
2024-02-19 16:33:16
...
mysql8以后创建用户和权限管理的命令略有修改
- 创建用户
create user 'test1'@'localhost' identified by '‘密码';
2、修改密码
alter user 'test1'@'localhost' identified by '新密码';
3、授权
grant all privileges on *.* to 'test1'@'localhost' with grant option;
4、查看权限
show grants for 'test1'@'localhost';
5、撤销权限
revoke all privileges on *.* from 'test1'@'localhost';
6、删除用户
drop user 'test1'@'localhost';
7、刷新权限
FLUSH PRIVILEGES ;
上一篇: mysql截取函数常用方法使用说明
下一篇: 聊聊QT添加MySQL驱动依赖的问题