mysql5.7初始化后连接mysql的时候报:Your password has expired.

来源:互联网 发布:淘宝特种经营许可申请 编辑:程序博客网 时间:2024/05/16 19:16

mysql5.7初始化后连接mysql的时候报:

ERROR 1862 (HY000): Your password has expired. To log in you must chang

意思很明确密码过期了,但是奇怪的,我其他两个实例都没这个问题,挺诡异。。。

现在直接说怎么解决

初始化的时候带上:skip-grant-tables

mysqld --defaults-file=/path/my.cnf --skip-grant-tables &

然后连接mysql,进入后看下root账号的信息

select * from mysql.user where user='root';

发现麻蛋这个字段password_expired的是是Y,改成N就可以了

update mysql.user set password_expired='N'where user='root';

到此问题就解决了


麻蛋,这个问题困惑了好久,折腾了几个晚上,我同一台机子,其他两个实例就没这问题,真是诡异

阅读全文
0 0
原创粉丝点击