环境:

ubuntu14.04  mysql5.7

一、mysql5.7 密码过期问题

报错:

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

翻译:

错误1862(HY000):你的密码已经过期。登录必须改变它使用一个客户端,支持过期的密码。

解决方法:

1、 用忽略授权表的方法进入mysql

        vi /etc/my.cnf
   [mysqld]
   skip-grant-tables
   :wq! #保存退出
 

2、进入mysql,查看root用户的详细信息

        # mysql -u root -p
> use mysql
> select * from mysql.user where user='root' \G
 
*************************** 1. row ***************************
Host: localhost
User: root
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: Y
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: *AC241830FFDDC8943AB31CBD47D758E79F7953EA
password_expired: N
password_last_changed: 2015-11-11 16:52:49
password_lifetime: NULL
account_locked: N
1 row in set (0.00 sec)
 

3、把password_expired 改成不过期

        >  update user set password_expired='N' where user='root';
> flush privileges;
> quit
 

4、把 /etc/my.cnf 的 skip-grant-tables 这行注释掉

5、重启服务

     #service mysql restart
 

6、再次登陆 mysql 就正常了

转自:http://blog.51cto.com/dahui09/1775501

mysql5.7密码过期ERROR 1862 (HY000): Your password has expired. To log in you must change的更多相关文章

  1. [mysql] ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

    今天安装mysql遇到这样一个问题: ERROR 1862 (HY000): Your password has expired. To log in you must change it using ...

  2. mysql5.7.24启动报错:ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

    报错原因是:密码过期.不管你是刚刚修改密码还是什么,只要登陆都是有问题的,都是报这样子的错误. 解决方法是: 1.修改/etc/my.cnf文件,在[mysqld]下加入“skip-grant-tab ...

  3. MySQL5.7出现Your password has expired. To log in you must change it using a client that supports expir

    今天晚上本来想写bootstrap-fileinput插件集成fastdfs的文章,但是刚启动idea里面的QiYuAdmin就出现了错误: Your password has expired. To ...

  4. mysql ERROR 1862 (HY000): 密码超时错误解决 Your password has expired.To log in you must change it using a client that supports expired password

    工具链接可能报错,使用黑窗口链接后: 1. SET PASSWORD = PASSWORD("xinmima"); 2. flush privileges; 使用新密码链接即可.

  5. 解决Navicat连接mysql报错:1862 - Your password has expired. To log in you must change it using a client that supports expired passwords.

    今天尝试用Navicat连接mysql时,发现一个1862的报错问题: 后来参照这篇文章https://blog.csdn.net/u010513756/article/details/5073501 ...

  6. mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    注:本文来源于<  mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy r ...

  7. mysql5.7 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    mysql5.7初次登录使用提示 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before ...

  8. MySQL5.7 报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

    MySQL5.7 报错 : ERROR 1820 (HY000): You must reset your password using ALTER USER statement before exe ...

  9. Mysql 5.7 密码策略 ERROR 1819 (HY000)

    Mysql 5.7 默认对用户密码有密码强度要求,如果指定弱密码,会提示如下: ERROR (HY000): Your password does not satisfy the current po ...

随机推荐

  1. Vue相关知识点记录

    1.安装 vue不支持ie8以下版本(无法模拟ECMAScript5特性),支持所有兼容ECMAScript5的浏览器. 浏览器安装Vue Devtools, 可以在更友好的界面中审查和调试Vue应用 ...

  2. window 10 npm install node-sass报错

    最近准备想用vue-cli初始化一个项目,需要sass-loader编译: 发现window下npm install node-sass和sass-loader一直报错, window 命令行中提示我 ...

  3. android studio学习----打包

    Gradle打包APP签名 默认情况下,debug被配置成使用一个debug keystory.debug keystory使用了默认的密码和默认key及默认的key密码.debug构建类型会自动使用 ...

  4. Mysql 控制结构初识

    Mysql 流程控制 认识 从我目前所接触的编程语言,C, R, VB, Python, Javascript...,来看, 无非就是变量, 表达式, 流程控制(顺序, 分支, 循环), 封装了一些更 ...

  5. List加载因子和扩容因子

    List.Map.set的加载因子,默认初始容量和扩容增量 首先,这三个概念说下.初始大小,就是创建时可容纳的默认元素个数:加载因子,表示某个阀值,用0~1之间的小数来表示,当已有元素占比达到这个阀值 ...

  6. 【Spring Boot】Spring Boot之整合RabbitMQ并实现消息的发送和接收

    一.项目配置 1)引入maven坐标 <!--amqp--> <dependency> <groupId>org.springframework.boot</ ...

  7. ansible-playbook安装zabbix_server,agent监控

    主要完成通过playbook自动生成zabbix_server,agent,这里没有完全实现自动化,这里机器的获取还是需要人为手工填写,如果感兴趣想通过自动获取需要部署的机器可以通过namp扫描工具a ...

  8. 【解决】Error: ENOSPC: no space left on device, watch

    发现问题: 启动 node 项目ReactNative时候出现报错Error: ENOSPC: no space left on device, watch [root@iz2zeihk6kfcls5 ...

  9. mysql免安装版配置和一些常见问题

    博客原文点我 今天在Windows Server 2003下安装mysql,遇到不少问题.之前在另外两台服务器安装的时候也遇到了几个问题,最后找到不少文章解决了,记录一下. 所有版本都是免安装的32和 ...

  10. 洛谷 P1330 封锁阳光大学题解

    题目描述 曹是一只爱刷街的老曹,暑假期间,他每天都欢快地在阳光大学的校园里刷街.河蟹看到欢快的曹,感到不爽.河蟹决定封锁阳光大学,不让曹刷街. 阳光大学的校园是一张由N个点构成的无向图,N个点之间由M ...