密码自动过期是mysql 5.7.4引入的新功能。
由参数default_password_lifetime控制。从5.7.4到5.7.10,默认是360天。设置为0,即不开启密码过期设置。

取消某个用户密码过期设置:

alter user 'username'@'localhost' password expire never;

  

全局设置密码过期时间
1.在配置文件中设置

[mysqld]
default_password_lifetime=180

2.动态设置

set global default_password_lifetime = 180;

针对个别用户设置

1.设置用户密码过期时间

alter user 'username'@'localhost' password expire interval 90 day;

2.取消用户密码过期设置

alter user 'username'@'localhost' password expire never;

3.设置用户密码过期策略为默认策略(即全局默认设置)

alter user 'username'@'localhost' password expire default;

  

mysql密码过期问题的更多相关文章

  1. mysql 密码过期问题

    问题描述: Your password has expired. To log in you must change it using a client that supports expired p ...

  2. mysql密码过期的修改方法(your password has expired)

    今天打开SQLyog提示密码过期:Your password has expired 解决方法:    1.  启动MySQL服务 2.  启动MySQL后台 3.  执行以下命令 step 1: S ...

  3. 2、mysql密码过期的修改方法(your password has expired)

    今天打开SQLyog提示密码过期:Your password has expired 解决方法:    1.  启动MySQL服务 2.  启动MySQL后台 3.  执行以下命令 step 1: S ...

  4. MySQL密码过期策略

    如果要设置密码永不过期的全局策略,可以这样:(注意这是默认值,配置文件中可以不声明) [mysqld] default_password_lifetime=0 禁用密码过期: ALTER USER ' ...

  5. MySQL密码过期

    1.用mysql命令行登录mysql的root用户 2.重新修改root密码 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); my ...

  6. mysql 密码过期问题 password_expired

    mysql> select user,host,password_expired from mysql.user; +-----------------+----------------+--- ...

  7. Mysql 密码过期

      1. Cd D:\xampps\mysql\bin 输入命令:mysql -u root -p,回车即可进入mysql命令行界面. mysql->show database; mysql-& ...

  8. mysql-5.7 密码过期详解

    一.起源: 今天一上班就听到说error-log里记录了大量的 ERROR 1820 (HY000): You must reset your password using ALTER USER st ...

  9. 详解MySQL的用户密码过期功能

    这篇文章主要为大家详细介绍了MySQL的用户密码过期功能的相关资料,需要的朋友可以参考下   Payment Card Industry,即支付卡行业,PCI行业表示借记卡.信用卡.预付卡.电子钱包. ...

随机推荐

  1. 其原因可能是堆被损坏,这也说明 xxx.exe 中或它所加载的任何 DLL 中有 bug

    1.代码如下: string src ="abcdabcd"; char* dst = new char[8]; strcpy(dst,src.c_str()); delete[] ...

  2. 微软BI 之SSRS 系列 - 报表中分组聚合中处理不规则层次结构的技巧(没有子元素的时候不展开, 删除+符号)

    分组聚合的展开和收起效果在SSRS Report中非常常用,并且有时还要处理一些比较特别的情况.比如分组合并时有的层次结构是不规则的,有的组有两层,遇到这种情况应该如何处理?   注意到下面的这个需求 ...

  3. Yahoo邮箱最后登录,成为历史!

  4. Windows服务安装与控制

    Windows服务安装与控制 1.建立服务 (1)定义一个ServiceInstaller using System; using System.Collections.Generic; using ...

  5. Android 调用webservice并解析

    这是调用webService的具体方法 private final static String nameSpace="http://tempuri.org/"; private f ...

  6. SqlDataAdapter概述

    SqlDataAdapter是 DataSet和 SQL Server之间的桥接器,用于检索和保存数据.SqlDataAdapter通过对数据源使用适当的Transact-SQL语句映射 Fill(它 ...

  7. Python——UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

    当字符串比较中有中文时,需要在中文字符串前加 u  转为unicode编码才可以正常比较. str == u"中文"

  8. Java线程池的使用以及原理

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6543909.html  一:线程池简介 在使用多线程来提高处理器利用率的同时,由于线程的不断创建和销毁所造成的 ...

  9. Permutation Sequence 序列排序

    The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the p ...

  10. android camera preview常用格式

    在Camera中推荐使用NV21和YV12,因为这两种格式支持所有的相机设备. 但是在Camera2中,推荐使用的格式则是YUV_420_888. 总的来说,在Android里面YUV用得比较多的应该 ...