数据库由5到8,加密方式改变
方法:
1.mysql -u root -p
2.更改加密方式
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
3.改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';
4.刷新
FLUSH PRIVILEGES;
重新连接即可