Skip to content

Commit 9d48375

Browse files
committed
erro log and other changes
1 parent 65f1ce2 commit 9d48375

File tree

7 files changed

+92
-5
lines changed

7 files changed

+92
-5
lines changed

articles/mysql/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@
120120
href: flexible-server/concepts-monitoring.md
121121
- name: Slow query Logs
122122
href: flexible-server/concepts-slow-query-logs.md
123+
- name: Error logs
124+
href: flexible-server/concepts-error-logs.md
123125
- name: Audit logs
124126
href: flexible-server/concepts-audit-logs.md
125127
- name: Workbooks
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: 'Error logs - Azure Database for MySQL - Flexible Server'
3+
description: This article describes the error logs feature for Azure Database for MySQL - Flexible Server.
4+
ms.service: mysql
5+
ms.subservice: flexible-server
6+
ms.topic: conceptual
7+
author: code-sidd
8+
ms.author: sisawant
9+
---
10+
11+
# Error Logs in Azure Database for MySQL - Flexible Server (Preview)
12+
13+
[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
14+
15+
In Azure Database for MySQL - Flexible Server, the error log is available to users to configure and access. Error logs in MySQL gather diagnostic messages during server startup and shutdown, and while the server is running, information that can help proactive troubleshooting. For more information about the MySQL error log, see the [Error log](https://dev.mysql.com/doc/refman/8.0/en/error-log.html) section in the MySQL documentation.
16+
Under Preview phase, error logs are available under Server logs only, error logs **can't be emitted** to [Azure Diagnostic logs](./../../azure-monitor/essentials/platform-logs-overview.md).
17+
18+
>[!Note]
19+
>The Error Log feature is accessible for new servers created after *1st December 2023*. For existing servers, this feature will become available following their scheduled maintenance in January 2024. To enable the Error Log feature on existing servers, before January 2024, kindly contact us via [support ticket](./../../azure-portal/supportability/how-to-manage-azure-support-request.md).
20+
21+
In Azure Database for MySQL - Flexible Server, enabling the error log under [Server logs](./concepts-monitoring#server-logs) in the Azure portal records details in multiple files named using the syntax *mysql-error-<servername>-<timestamp>.log*. In the file name, the timestamp (in GMT/UTC) associated with when the file was generated is appended, identifying the specific time that that log entries were recorded. For more information, see [Server logs retention.](./concepts-monitoring#server-logs)
22+
23+
## Enabling Error logs (Preview)
24+
25+
Users can access and configure the error logs in Azure Database for MySQL – Flexible Server via the Server logs feature, which can be enabled using the [Azure portal](./ how-to-server-logs-portal#enable-server-logs) or [Azure CLI](./how-to-server-logs-cli).
26+
After the feature is enabled, your MySQL flexible server starts capturing events and writes them to a series of files saved as activity occurs.
27+
28+
To enable Error logs, perform the following steps.
29+
1. In the Azure portal, navigate to your flexible server, and then, under Monitoring, select Server logs.
30+
2. Under Server logs, select the Enable check box, which enables the server logs features
31+
3. Under Select logs to enable, select the Error logs check box.
32+
33+
:::image type="content" source="./media/concepts-error-logs/1-concepts-errorlog.png" alt-text="Portal view showing Error Logs - Enable.":::
34+
35+
4. Select Save to proceed with deployment.
36+
37+
38+
You can also enable Error logs on your Azure Database for MySQL flexible server by [enabling the server parameter](./how-to-configure-server-parameters-portal) named *“error_server_log_file”* via the Server parameters pane or via the [Azure CLI](./how-to-configure-server-parameters-cli).
39+
40+
Ensure that the [Server logs feature](./how-to-server-logs-portal#enable-server-logs) is activated by selecting the *Enable* checkbox in the Server logs pane. Alternatively, set the server parameter "log_output" to FILE to enable server logs. Failure to perform either of these actions result in FILE logging not being enabled for your Azure Database for MySQL flexible server.
41+
42+
## Accessing Error logs
43+
You can download the error logs for further analysis of your Azure Database for MySQL flexible server. To download the logs, in the Azure portal, navigate to the Server logs section, and then select the Error logs tab, as shown.
44+
- Under **Name**, select the log file you want to download, and then, under **Action**, select **Download**.
45+
46+
:::image type="content" source="./media/concepts-error-logs/2-concepts-errorlog.png" alt-text="Portal view showing Error Logs - Download.":::
47+
48+
- To download multiple log files at one time, under **Name**, select the files you want to download, select **Download**.
49+
50+
:::image type="content" source="./media/concepts-error-logs/3-concepts-errorlog.png" alt-text="Portal view showing Error Logs - Multiple Downloads.":::
51+
52+
53+
### Access error logs using Azure CLI
54+
You can list the server logs from your flexible server by using the following command.
55+
```azurecli
56+
az mysql flexible-server server-logs list --resource-group <myresourcegroup> --server-name <server_name> --out table
57+
```
58+
59+
To download the mentioned server logs to your current directory, use the following command:
60+
```azurecli
61+
az mysql flexible-server server-logs download --resource-group <myresourcegroup> --server-name <server_name> --name <mysql-error-<server_name>-<timestamp>.log>
62+
```
63+
64+
For more information, see [how to download the server logs files](./how-to-server-logs-portal#download-server-logs) via the Azure portal or via the [Azure CLI](./how-to-server-logs-cli#downloading-server-logs-using-azure-cli).
65+
66+
67+
### Error logs under Server logs retention
68+
When logging is enabled for an Azure Database for MySQL - Flexible Server, logs are available up to seven days from their creation. If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available. The 7-GB storage limit for server logs is available free of cost and can't be extended. Logs are rotated every 24 hours or 500 MB, whichever comes first.
69+
Importantly, you can download the logs before rotation, ensuring they have access to valuable server logs at any point within the retention period.
70+
For more detailed information on log rotation schedules and storage limits for various log types, refer to the [documentation on Server log retention](./concepts-monitoring#server-logs).
71+
72+
73+
## Frequently asked questions
74+
75+
*Question*: My error logs contain the note as shown, what does this mean?
76+
77+
`[Note] [Server] Access denied for user ''@'xx.xx.xx.X' (using password: NO).`
78+
79+
*Answer*: This note indicates that an attempt to connect to your MySQL server was unsuccessful due to incorrect or missing authentication details. Specifically, the username provided is empty(''@'xx.xx.xx.X') and no password was entered (using password: NO). This note could indicate an unauthorized attempt to access your database.
80+
If your server is publicly accessible, it remains exposed to the internet and can be a target for unauthorized access attempts. To enhance the security of your Azure Database for MySQL flexible server, [disable public access](./concepts-networking-private-link#deny-public-access) or [limit access using firewall rules.](./concepts-networking-public#firewall-rules).
81+
82+
## Next steps
83+
- How to enable server logs feature via Azure portal. [Learn more](./how-to-server-logs-portal.md)
84+
- How to enable server logs feature via Azure CLI. [Learn more](./how-to-server-logs-cli.md)

articles/mysql/flexible-server/concepts-monitoring.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@ These metrics are available for Azure Database for MySQL:
119119
## Server logs
120120

121121
In Azure Database for MySQL Server – Flexible Server, users can configure and download server logs to assist with troubleshooting efforts. With this feature enabled, a flexible server starts capturing events of the selected log type and writes them to a file. You can then use the Azure portal and Azure CLI to download the files to work with them.
122-
The server logs feature is disabled by default. For information about how to enable server logs, see [How to enable and download server logs for Azure Database for MySQL - Flexible Server](./how-to-server-logs-portal.md)
122+
The server logs feature is disabled by default. For information about how to enable server logs, see [How to enable and download server logs for Azure Database for MySQL - Flexible Serve.r](./how-to-server-logs-portal.md)
123123

124+
Server logs supports [slow query logs](./concepts-slow-query-logs.md) and [error logs](./concepts-error-logs.md) for enabling and downloading.
124125
To perform a historical analysis of your data, in the Azure portal, on the Diagnostics settings pane for your server, add a diagnostic setting to send the logs to Log Analytics workspace, Azure Storage, or event hubs. For more information, see [Set up diagnostics](./tutorial-query-performance-insights.md#set-up-diagnostics).
125126

126127
**Server logs retention**
127128

128-
When logging is enabled for an Azure Database for MySQL - Flexible Server, logs are available up to seven days from their creation.
129-
If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
129+
When logging is enabled for an Azure Database for MySQL - Flexible Server, all the logs, *including error logs and slow query logs* are available up to seven days from their creation. If the total size of all the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
130130
The 7-GB storage limit for server logs is available free of cost and can't be extended.
131-
Logs are rotated every 24 hours or 7 GB, whichever comes first.
131+
Logs are rotated every 24 hours or 500MB, whichever comes first.
132132

133133

134134
## Next steps
39.4 KB
Loading
104 KB
Loading
64.4 KB
Loading

articles/mysql/flexible-server/overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ One advantage of running your workload in Azure is its global reach. The flexibl
185185
| France Central | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
186186
| France South | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
187187
| Germany West Central | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
188+
| Israel Central | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
188189
| Japan East | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
189190
| Japan West | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
190191
| Korea Central | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
@@ -194,7 +195,7 @@ One advantage of running your workload in Azure is its global reach. The flexibl
194195
| Norway East | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
195196
| Norway West | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
196197
| Qatar Central | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
197-
| South Africa North | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
198+
| South Africa North | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
198199
| South Central US | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
199200
| South India | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
200201
| Southeast Asia | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

0 commit comments

Comments
 (0)