Azure Database for MySQL server logs - az mysql server-logs

Commands to manage Azure Database for MySQL server logs.

Commands

az mysql server-logs download Download log file(s) to current directory for Azure Database for MySQL.
az mysql server-logs list List log files for Azure Database for MySQL.

az mysql server-logs download

Download log file(s) to current directory for Azure Database for MySQL.

az mysql server-logs download --name
--resource-group
--server-name

Examples

Download log file f1 and f2 for server testsvr.

az mysql server-logs download -g testgroup -s testsvr -n f1.log f2.log

Required Parameters

--name -n

Space separated list of log filenames on the server to download.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--server-name -s

Name of the server.

az mysql server-logs list

List log files for Azure Database for MySQL.

az mysql server-logs list --resource-group
--server-name
[--file-last-written]
[--filename-contains]
[--max-file-size]

Examples

List logs files modified in last 72 hours (default value).

az mysql server-logs list -g testgroup -s testsvr

List logs files modified in last 10 hours.

az mysql server-logs list -g testgroup -s testsvr --file-last-written 10

List logs files that size not exceeds 30KB.

az mysql server-logs list -g testgroup -s testsvr --max-file-size 30

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--server-name -s

The name of the server.

Optional Parameters

--file-last-written

Interger in hours to indicate file last modify time, default value is 72.

--filename-contains

The pattern that file name should match.

--max-file-size

The file size limitation to filter files.