MYSQL 5.6鎖定使用者
5.7加入了LOCK ACCOUNT功能和ORACLE一樣了,
但是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 標示了是否過期。
但是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 標示了是否過期。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-2122068/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何使用mysql 5.6 information schema定位事務鎖資訊MySqlORM
- MySQL5.6 5.7使用者臨時表 對比MySql
- HPUX下解除使用者鎖定UX
- MySQL 5.6 關於登陸的初始化設定MySql
- MySql(七):MySQL效能調優——鎖定機制與鎖優化分析MySql優化
- mysql 5.6官方文件MySql
- AIX使用者賬戶鎖定與解鎖最佳方法AI
- 如何在Linux中鎖定和解鎖多個使用者Linux
- MySQL – 事務的啟動 / 設定 / 鎖 / 解鎖——入門MySql
- Windows 安裝 MySQL 5.6WindowsMySql
- MySQL:5.6 升級 5.7MySql
- mysql5.6備份MySql
- MySQL 5.6主主同步MySql
- CanalBinlogChange(mysql5.6)GCMySql
- 設定Mysql5.6允許外網訪問詳細流程MySql
- MySQL 5.6的表壓縮MySql
- MySQL 5.6 Table cache 簡介MySql
- mysql5.1升級5.6MySql
- MySQL 5.6 RPM安裝MySql
- Mysql5.6 Master+MasterMySqlAST
- CentOS tengine mysql 5.7 php 5.6CentOSMySqlPHP
- mysql鎖之死鎖MySql
- 【MySQL】MySQL 5.6 引數之 extra_portMySql
- 在 Linux 中鎖定和解鎖使用者帳戶的三種方法Linux
- Oracle 10g使用者鎖定的問題Oracle 10g
- 【MySQL】5.6.x sha256_password外掛登入使用者時報錯MySql
- MySQL運維實戰(5.6) 字符集設定對mysqldump的影響MySql運維
- Percona MySQL 5.6 語句加鎖報錯"ERROR 1665 (HY000): Cannot execute statement"MySqlError
- (16)mysql 中的表鎖定及事務控制MySql
- MySQL 5.6 GTID 原理以及使用MySql
- Mysql5.6 自動化部署MySql
- Windows 安裝並配置 MySQL 5.6WindowsMySql
- Linux安裝Mysql5.6LinuxMySql
- MySQL5.6複製原理圖MySql
- Percona MySQL 5.6 HINT介紹MySql
- MySQL5.6 create table原理分析MySql
- LAMP環境搭建-MySQL5.6LAMPMySql
- mysql5.6的安裝(cmake)MySql