Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does MYSQL 5.6 lock down users

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces how MYSQL 5.6 locks users, the content is very detailed, interested friends can refer to it, I hope it can help you.

5.7 Added LOCK ACCOUNT function and Oracle same,

However, 5.6 does not seem to have, but instead of setting the password expiration, use the following method.

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".

That's the grammar below.

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

if you want to restore

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

The password_expired field below MYSQL.USER indicates whether it has expired.

MYSQL 5.6 is how to lock users to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report