关于MySQL 8.0.16的安装,我是参考了↓
安装后发现使用不了,提示密码过期“your password has expired. To log in you must change it using a client that supports expired passwords.”
搜索并测试了N个解决方案后,终于发现了一个可行方案:
1。打开“命令提示符”
![](https://img-blog.csdnimg.cn/img_convert/0b50cccb5b3b4b4c359eec9ef375e3f8.png)
2。输入:mysql -uroot -p
输入:已过期的密码
![](https://img-blog.csdnimg.cn/img_convert/82c65a203c6256164210be7e39c2420f.png)
3。输入: alter user 'root'@'localhost' identified by '新密码'; (这里我设了123456)
4。输入:alter user 'root'@'localhost'password expire never; (使新设置的密码永不过期)
5。输入:flush privileges; (保存 刷新)
![](https://img-blog.csdnimg.cn/img_convert/77ff2f0c8eb04ebdb3b0a0a4518a7e4d.png)
END(亲测有效)