mysql8 分配权限
发布时间:2022-03-11 13:35:03 作者:米站 阅读量:159
## mysql8 分配权限
use mysql
select host,user,plugin from user;
update user set host='222.176.211.8' where user ='root' and host='183.69.220.79';
ALTER USER 'root'@'183.69.220.79' IDENTIFIED WITH mysql_native_password BY 'qym2021';
FLUSH PRIVILEGES;
grant all privileges on tableName.* to 'root'@'183.69.220.79';
grant all privileges on database.table to 'root'@'183.69.220.79'; // 分配权限到表
grant all privileges on database.* to 'root'@'183.69.220.79'; // 分配权限到数据库
grant all privileges on *.* to 'root'@'183.69.220.79'; // 分配权限到所有数据库
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
FLUSH PRIVILEGES;
Mysql 8创建用户
CREATE USER `developer`@`%` IDENTIFIED BY '123456';
GRANT ALL ON *.* TO `developer`@`%` WITH GRANT OPTION;
ALTER USER 'developer'@'%' IDENTIFIED WITH mysql_native_password BY '123456'

Original article, reproduced please specify:mysql8 分配权限 | 米站互联

我要评论 登录后才能发布评论

搜索

  热门标签


用户登录
account_circle
Copyright©2022 米站互联   
渝ICP备18003878号
http://blog.rziqee.cn/index.php/
Catfish(鲶鱼) CMS V 6.4.0
留言
email
account_circle
textsms