网络编程
位置:首页>> 网络编程>> 数据库>> ERROR 1862 (HY000): Your password has expired. To log in you must change it using a .....

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

作者:扛麻袋的少年  发布时间:2024-01-12 19:56:51 

标签:密码,过期,mysql

错误信息:

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 .....

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

来源:https://blog.csdn.net/lzb348110175/article/details/103055606

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com