问题描述:运用AUD审计找出锁定用户的客户端IP 1.查询被锁用户 SELECT USERNAME, ACCOUNT_STATUS, LOCK_DATE FROM DBA_USERS WHERE ACCOUNT_STATUS = 'LOCKED(TIMED)'; SELECT USERNAME, ACCOUNT_STATUS, LOCK_DATE FROM DBA_USERS WHERE ACCOUNT_STATUS = 'LOCKED'; USERNAME ACCOUNT_STATUS LOC
使用ALTER USER 语句锁定 mysql>ALTER USER 'demo'@'localhost' ACCOUNT LOCK; Query OK, rows affected (0.00 sec) 使用被锁账号登录会报ERROR 3118错误: $ mysql -udemo -p Enter password: ERROR (HY000): Access denied for user 'demo'@'localhost'. Account is locked. 解锁账号 mysql>