标签:localhost lob code show 用户 exp from hang 时间
#全局设定mysql> SET GLOBAL default_password_lifetime = 90;
ALTER USER ‘test’@‘localhost‘ PASSWORD EXPIRE INTERVAL 30 DAY;
ALTER USER ‘test‘@‘localhost‘ PASSWORD EXPIRE NEVER;
ALTER USER ‘test‘@‘localhost‘ PASSWORD EXPIRE DEFAULT;
mysql> ALTER USER ‘test‘@‘localhost‘ PASSWORD EXPIRE;
select user,host,password_expired,password_last_changed,password_lifetime from user;
password_expired:枚举值,设置用户密码是否过期的开关,默认为N。
password_last_changed:记录密码最近修改的时间
password_lifetime:设置密码的有效时间,天数
show create user test@‘localhost‘;
ALTER USER test@‘localhost‘ IDENTIFIED BY ‘password‘;
标签:localhost lob code show 用户 exp from hang 时间
原文地址:https://blog.51cto.com/395469372/2512875