|
1 | 1 | ---
|
2 |
| -title: Access server logs in Azure Database for MySQL by using Azure CLI |
3 |
| -description: This article describes how to access the server logs in Azure Database for MySQL by using the Azure CLI command-line utility. |
4 |
| -author: rachel-msft |
5 |
| -ms.author: raagyema |
| 2 | +title: Access slow query logs in Azure Database for MySQL by using Azure CLI |
| 3 | +description: This article describes how to access the slow query logs in Azure Database for MySQL by using the Azure CLI. |
| 4 | +author: andrela |
| 5 | +ms.author: ajlam |
6 | 6 | ms.service: mysql
|
7 | 7 | ms.devlang: azurecli
|
8 | 8 | ms.topic: conceptual
|
9 |
| -ms.date: 05/29/2019 |
| 9 | +ms.date: 06/12/219 |
10 | 10 | ---
|
11 |
| -# Configure and access server logs by using Azure CLI |
12 |
| -You can download the Azure Database for MySQL server logs by using Azure CLI, the Azure command-line utility. |
| 11 | +# Configure and access slow query logs by using Azure CLI |
| 12 | +You can download the Azure Database for MySQL slow query logs by using Azure CLI, the Azure command-line utility. |
13 | 13 |
|
14 | 14 | ## Prerequisites
|
15 | 15 | To step through this how-to guide, you need:
|
16 | 16 | - [Azure Database for MySQL server](quickstart-create-mysql-server-database-using-azure-cli.md)
|
17 | 17 | - The [Azure CLI](/cli/azure/install-azure-cli) or Azure Cloud Shell in the browser
|
18 | 18 |
|
19 |
| -## Configure logging for Azure Database for MySQL |
| 19 | +## Configure logging |
20 | 20 | You can configure the server to access the MySQL slow query log by taking the following steps:
|
21 |
| -1. Turn on logging by setting the **slow\_query\_log** parameter to ON. |
| 21 | +1. Turn on slow query logging by setting the **slow\_query\_log** parameter to ON. |
22 | 22 | 2. Adjust other parameters, such as **long\_query\_time** and **log\_slow\_admin\_statements**.
|
23 | 23 |
|
24 |
| -To learn how to set the value of these parameters through Azure CLI, see [How to configure server parameters](howto-configure-server-parameters-using-cli.md). |
| 24 | +To learn how to set the value of these parameters through Azure CLI, see [How to configure server parameters](howto-configure-server-parameters-using-cli.md). |
25 | 25 |
|
26 | 26 | For example, the following CLI command turns on the slow query log, sets the long query time to 10 seconds, and then turns off the logging of the slow admin statement. Finally, it lists the configuration options for your review.
|
27 | 27 | ```azurecli-interactive
|
|
0 commit comments