0
点赞
收藏
分享

微信扫一扫

MySQL8账号密码和权限的常用操作

生态人 2022-04-14 阅读 94
mysql

修改 root 的密码

alter user 'root'@'localhost' indentified by '111111';

-- 解决 cache_sha2_password 问题 
alter user 'test'@'%' indentified WITH mysql_native_password by '111111';

flush privileges;

创建用户并设置权限

CREATE USER 'test'@'%' IDENTIFIED BY '111111';

grant all privileges on *.* to test@% ;
flush privileges;
举报

相关推荐

0 条评论