01 Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers (IDs):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd"
]
03 Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to examine as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az account set
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
04 Run mysql flexible-server list command (Windows/macOS/Linux) with custom output filters to list the name of each MySQL flexible server (and the name of the associated resource group) available in the selected Azure subscription:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az mysql flexible-server list
--output table
--query '[*].{name:name, resourceGroup:resourceGroup}'
05 The command output should return a table with requested MySQL server information:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
Name ResourceGroup
-------------------- ------------------------------
cc-mysql-flexible-db cloud-shell-storage-westeurope
cc-project9-mysql-db cloud-shell-storage-westeurope
06 Run mysql flexible-server parameter show command (Windows/macOS/Linux) with the name of the Azure MySQL flexible server that you want to examine and its associated resource group as the identifier parameters, to get the require_secure_transport parameter value for the selected MySQL server in order to determine the encryption feature status:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az mysql flexible-server parameter show
--server-name "cc-mysql-flexible-db"
--resource-group "cloud-shell-storage-westeurope"
--name require_secure_transport
--query 'value'
07 The command output should return the requested configuration value ("ON" or "on" for enabled, "OFF" or "off" for disabled):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
"OFF"
If the
mysql flexible-server parameter show command output returns
"OFF", as shown in the example above, the Transport Encryption feature is not enabled for the selected Azure MySQL flexible database server.
08 Repeat steps no. 6 and 7 for each MySQL flexible server provisioned in the selected Azure subscription.
09 Repeat steps no. 3 – 8 for each subscription available within your Microsoft Azure cloud account.