Mysql 创建用户并授权方法
2022/2/18 19:13:33
本文主要是介绍Mysql 创建用户并授权方法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
一、创建用户
root 用户登陆,切换到mysql 数据库:
create user 'test'@"%" identified by 'test123'; create user 'test'@‘localhost' identified by 'test123'; create user 'qa'@'localhost' identified by 'qa123456';二、授予权限
grant all privileges on *.* to test@‘%’; grant all privileges on *.* to test@‘localhost’; grant all privileges on *.* to qa@'localhost';三、刷新权限
flush privileges;四、修改用户密码
切换到mysql 数据库: use mysql;
update user set password=password("cx_qa123456") where user="cx_test"; flush privileges;这篇关于Mysql 创建用户并授权方法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-21MySQL集群部署资料:新手入门教程
- 2024-09-21MySQL集群资料:初学者入门指南
- 2024-09-21部署MySQL集群资料:新手入门教程
- 2024-09-20MySQL集群部署教程:新手入门指南
- 2024-09-20MySQL集群教程:初学者必备指南
- 2024-09-20部署MySQL集群项目实战:新手入门教程
- 2024-09-20如何部署MySQL集群:简单教程
- 2024-09-20MySQL集群部署:新手入门指南
- 2024-09-20部署MySQL集群学习:入门指南
- 2024-09-20部署MySQL集群入门教程