#修改加密规则
ALTER USER ‘root‘@‘%‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER;
#更新一下用户的密码
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘password‘; #刷新权限 FLUSH PRIVILEGES; #重置密码 alter user ‘root‘@‘%‘ identified by ‘123qwe‘
注意:上面 % 是设置远程连接,本地连接设为localhost即可
原文地址:https://www.cnblogs.com/notchangeworld/p/12208538.html
时间: 2024-11-10 15:15:28