时间:2021-07-01 10:21:17 帮助过:4人阅读
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘111111‘;※如果执行此句 ,则一步到位,3步骤无需执行
设置为远程登录
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘root‘ WITH GRANT OPTION; 刷新权限 FLUSH PRIVILEGES;
(2)查看用户
select host,user,plugin,authentication_string from mysql.user;
备注:host为 % 表示不限制ip localhost表示本机使用 plugin非mysql_native_password 则需要修改密码
(3)修改用户密码
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘newpassword‘; #更新一下用户的密码 root用户密码为newpassword
MySQL8.0版本安装后授权
标签:刷新 root用户 create native mysql8 sel 图片 pre 步骤