Note
This view is available starting with V3.2.1.
Purpose
information_schema.CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS displays the number of failed login attempts for different users.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| USERHOST | varchar(261) | NO | The combination of the username and host information for the failed login. The format is <user_name>@<hostname or ip address> |
| FAILED_ATTEMPTS | bigint(20) | NO | The number of failed login attempts. |
Sample query
Query the number of failed login attempts for a user.
obclient> SELECT * FROM information_schema.CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS;
The query result is as follows:
+-------------+-----------------+
| USERHOST | FAILED_ATTEMPTS |
+-------------+-----------------+
| 'test'@'%' | 5 |
+-------------+-----------------+
1 row in set
References
For more information about the login failure handling strategy in MySQL mode, see Login failure handling.