MySQL 5.6锁定用户

The mysql.usertable now has a password_expiredcolumn. Its default value is 'N', but

can be set to 'Y'with the new ALTER USER statement. After an account's password has been

expired, all operations performed in subsequent connections to the server using the account result

in an error until the user issues a SET PASSWORDstatement to establish a new account password.

For more information, see Section 13.7.1.1, “ALTER USERSyntax”, and Section 6.3.6, “Password

Expiration and Sandbox Mode”.

就是下面这个语法

mysql> alter user mytest1@'%' password expire;

如果要恢复

set password for mytest1@'%' = '*******';

其实就是MYSQL.USER下面的字段 password_expired 标示了是否过期。

扫描二维码关注公众号,回复: 1970312 查看本文章

猜你喜欢

转载自www.linuxidc.com/Linux/2016-07/133394.htm
今日推荐