title | description | services | author | ms.author | manager | editor | ms.service | ms.topic | ms.date |
---|---|---|---|---|---|---|---|---|---|
Configure and access server logs for Azure Database for MySQL in Azure Portal |
This article describes how to configure and access the server logs in Azure Database for MySQL from the Azure Portal. |
mysql |
rachel-msft |
raagyema |
kfile |
jasonwhowell |
mysql |
article |
02/28/2018 |
You can configure, list, and download the Azure Database for MySQL server logs from the Azure portal.
To step through this how-to guide, you need:
Configure access to the MySQL slow query log.
-
Sign in to the Azure portal.
-
Select your Azure Database for MySQL server.
-
Under the Monitoring section in the sidebar, select Server Logs.
-
Select the heading Click here to enable logs and configure log parameters to see the server parameters.
-
Change the parameters that you need to adjust. All changes you make in this session are highlighted in purple.
Once you have changed the parameters, you can click Save. Or you can Discard your changes.
-
Return to the list of logs by clicking the close button (X icon) on the Server Parameters page.
Once logging begins, you can view a list of available logs and download individual log files on the Server Logs pane.
-
Open the Azure portal.
-
Select your Azure Database for MySQL server.
-
Under the Monitoring section in the sidebar, select Server Logs. The page shows a list of your log files, as shown:
[!TIP] The naming convention of the log is mysql-slow-< your server name>-yyyymmddhh.log. The date and time used in the file name is the time is when the log was issued. Logs files are rotated every 24 hours or 7.5 GB, whichever comes first.
-
If needed, use the search box to quickly narrow down to a specific log based on date/time. The search is on the name of the log.
-
Download individual log files using the download button (down arrow icon) next to each log file in the table row as shown:
- See Access Server Logs in CLI to learn how to download logs programmatically.
- Learn more about Server Logs in Azure Database for MySQL.
- For more information about the parameter definitions and MySQL logging, see the MySQL documentation on Logs.