欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

程序员文章站 2023-10-31 12:40:28
错误信息: error 1862 (hy000): your password has expired. to log in you must change it usi...

错误信息:

error 1862 (hy000): your password has expired. to log in you must change it using a client that supports expired passwords

出现问题原因:

可能是你在安装 mysql过程中,通过mysqld --initialize 初始化 mysql 操作后,生成临时密码后,没有直接进行 mysql连接,中途重启服务或者重启机器等,导致密码失效问题

解决方式:

1.修改 my.cnf 配置文件

vi /etc/my.cnf

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

2.重启 mysql 服务

你可以使用 service mysqld restart 重启也行,因为我是通过二进制源码包安装的 mysql,这种方式启动目前报错。所以我是用安装目录下的 support-files 目录下的命令重启,如下图所示

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

3.无密码登录

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

4.同第 1 步,将新增的 skip-grant-tables =1 删除

5.同第 1 步,重启 mysql 服务

6.使用新密码 root 来登录 mysql

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

好了,本文结束,希望对大家有所帮助!