小知识,大挑战!本文正在参与“程序员必备小知识”创作活动。
以下命令是在cmd窗口下完成的。
1.登录mysql,连接用户为root。
mysql -u root -p
2.执行命令查看加密方式
use mysql;
select user,plugin from user where user=‘root’;
3.执行命令修改加密方式
alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘你的密码’;
4.属性权限使配置生效
flush privileges;