环境:

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. Java之路---Day15(Collection类)

    2019-11-01-22:09:09 目录 1.Collection集合的概念 2.Collection集合常用方法 3.Iterator迭代器 4.增强for 5.Collection常用工具类 ...

  2. 很带劲,Android9.0可以在i.MX8开发板上这样跑

    米尔MYD-JX8MX开发板移植了Android9.0操作系统,现阶段最高版本的Android9.0操作系统将给您的产品在安全与稳定性方面带来更大的提升.可惜了,这里不能上传视频在i.MX8开发板跑A ...

  3. layui 表格中实现照片预览,点击查看原图

    人员表格中实现照片预览,并且可点击放大.查看原图 <table id="dutyInfoTable" class="layui-hide">< ...

  4. Object-C与标准C/C++混合编程

    转自:http://www.xue5.com/Mobile/iOS/661674.html 如何将C++和Object-C混合编程开发IOS软件(Object-c调用C++) 原文网址:http:// ...

  5. Miniconda

    什么是conda conda的基本使用方式 conda是一个开源包管理系统和环境管理系统,用于安装多个版本的软件包及其依赖关系,并在它们之间轻松切换. 它适用于Linux,OS X和Windows,是 ...

  6. Mybatis如何插入空字段

    出现异常:SQLException : 无效的类型: 1111 使用Mybatis插入一条记录,某字段设为null,出错 尝试将空的mgr属性插入到数据库,解决办法: 添加setting属性jdbcT ...

  7. c#: WebBrowser控件注入js代码的三种方案

    聊做备忘. 假设js代码为: string jsCode = @"function showAlert(s) {{ alert('hello, world! ' + s);}}; showA ...

  8. Kombu源码分析(一)概述

    Celery是Python中最流行的异步消息队列框架,支持RabbitMQ.Redis.ZoopKeeper等作为Broker,而对这些消息队列的抽象,都是通过Kombu实现的.Kombu实现了对AM ...

  9. Xshell 配置密钥

  10. CodeForces - 1037H: Security(SAM+线段树合并)

    题意:给定字符串S:  Q次询问,每次询问给出(L,R,T),让你在S[L,R]里面找一个字典序最小的子串,其字典序比T大. 没有则输出-1: 思路:比T字典序大,而且要求字典最小,显然就是在T的尾巴 ...