您好,登錄后才能下訂單哦!
MySQL 8.0.19支持輸入3次錯誤密碼,鎖定賬戶功能
例子:
>CREATE?USER?'hechunyang'@'localhost'?IDENTIFIED?BY?'123456'?FAILED_LOGIN_ATTEMPTS?3?PASSWORD_LOCK_TIME?3;
FAILED_LOGIN_ATTEMPTS:代表嘗試失敗的次數
PASSWORD_LOCK_TIME:代表鎖定的時間,單位天,這里為鎖定3天。
????????????????????????????????????????? 如果設置UNBOUNDED,代表鎖定永久,直到手工解鎖。
故意輸錯3次以上密碼,賬戶被鎖定,如下所示:
#?mysql?-hlocalhost?-uhechunyang?-p123456789?-S?/tmp/mysql_hcy.sock mysql:?[Warning]?Using?a?password?on?the?command?line?interface?can?be?insecure. ERROR?3955?(HY000):?Access?denied?for?user?'hechunyang'@'localhost'. Account?is?blocked?for?3?day(s)?(3?day(s)?remaining)?due?to?3?consecutive?failed?logins.
手工解鎖:
alter?user?hechunyang@'localhost'?ACCOUNT?UNLOCK;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。