You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/concepts-audit-logs.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,16 @@ By default, audit logs are disabled. To enable them, set the `audit_log_enabled`
25
25
Other parameters you can adjust to control audit logging behavior include:
26
26
27
27
-`audit_log_events`: controls the events to be logged. See below table for specific audit events.
28
-
-`audit_log_include_users`: MySQL users to be included for logging. The default value for this parameter is empty, which will include all the users for logging. This has higher priority over `audit_log_exclude_users`. Max length of the parameter is 512 characters.
29
-
-`audit_log_exclude_users`: MySQL users to be excluded from logging. Max length of the parameter is 512 characters.
28
+
-`audit_log_include_users`: MySQL users to be included for logging. The default value for this parameter is empty, which will include all the users for logging. This has higher priority over `audit_log_exclude_users`. Max length of the parameter is 512 characters. For example, wildcard value of `dev*` includes all the users with entries starting with keyword `dev` like "dev1,dev_user,dev_2". Another example for wildcard entry for including user is `*dev` in this example, all users ending with value "dev" like "stage_dev,prod_dev,user_dev" are included in the audit log entries. Additionally, the use of a question mark `(?)` as a wildcard character is permitted in patterns.
29
+
-`audit_log_exclude_users`: MySQL users to be excluded from logging. The Max length of the parameter is 512 characters. Wildcard entries for user are also accepted to exclude users in audit logs. For example, wildcard value of `stage*` excludes all the users with entries starting with keyword `stage` like "stage1,stage_user,stage_2". Another example for wildcard entry for excluding user is `*com` in this example, all users ending with value `com` will be excluded from the audit log entries. Additionally, the use of a question mark `(?)` as a wildcard character is permitted in patterns.
30
30
31
31
> [!NOTE]
32
32
> `audit_log_include_users` has higher priority over `audit_log_exclude_users`. For example, if `audit_log_include_users` = `demouser` and `audit_log_exclude_users` = `demouser`, the user will be included in the audit logs because `audit_log_include_users` has higher priority.
33
33
34
34
|**Event**|**Description**|
35
35
| --- | --- |
36
-
|`CONNECTION`| - Connection initiation (successful or unsuccessful)<br />- User reauthentication with different user/password during session<br />- Connection termination |
@@ -77,6 +78,7 @@ The following sections describe the output of MySQL audit logs based on the even
77
78
|`user_s`| Name of user executing the query |
78
79
|`db_s`| Name of database connected to |
79
80
|`\_ResourceId`| Resource URI |
81
+
|`status_d`| Connection [Error code](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html) entry for CONNECTIONS_V2 event. |
80
82
81
83
### General
82
84
@@ -153,6 +155,17 @@ Once your audit logs are piped to Azure Monitor Logs through Diagnostic Logs, yo
153
155
| order by TimeGenerated asc nulls last
154
156
```
155
157
158
+
159
+
- List CONNECTION_V2 events on a particular server, `status_d` column denotes the client connection [error code](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html) faced by the client application while connecting.
160
+
161
+
```kusto
162
+
AzureDiagnostics
163
+
| where Resource == '<your server name>' //Server name must be in Upper case
164
+
| where Category == 'MySqlAuditLogs' and event_subclass_s == "CONNECT"
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/whats-new.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,16 @@ This article summarizes new releases and features in Azure Database for MySQL fl
24
24
> [!NOTE]
25
25
> This article references the term slave, which Microsoft no longer uses. When the term is removed from the software, we'll remove it from this article.
26
26
27
+
## February 2024
28
+
29
+
-**Audit logs now supports wild card entries**
30
+
31
+
The server parameters now supports wildcards in `audit_log_include_users` and `audit_log_exclude_users`, enhancing flexibility for specifying user inclusions and exclusions in audit logs. [Learn more](./concepts-audit-logs.md#configure-audit-logging)
32
+
33
+
-**Enhanced Audit Logging with CONNECTION_V2 for Comprehensive MySQL User Audits**
34
+
35
+
Server parameter [audit_log_events](./concepts-audit-logs.md#configure-audit-logging) now supports event CONNECTION_V2 for detailed connection logs, providing insights into user audits, connection status, and [error codes in MySQL](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html) interactions.[Learn more](./concepts-audit-logs.md#analyze-logs-in-azure-monitor-logs)
0 commit comments