Skip to content

Files

Latest commit

12c283d · May 6, 2022

History

History
85 lines (61 loc) · 3.65 KB

howto-configure-server-parameters-using-powershell.md

File metadata and controls

85 lines (61 loc) · 3.65 KB
title description author ms.author ms.service ms.devlang ms.topic ms.date ms.custom
Configure Azure Database for MariaDB - Azure PowerShell
This article describes how to configure the service parameters in Azure Database for MariaDB using PowerShell.
savjani
pariks
mariadb
azurepowershell
how-to
05/06/2022
devx-track-azurepowershell
kr2b-contr-experiment

Configure server parameters in Azure Database for MariaDB using PowerShell

You can list, show, and update configuration parameters for an Azure Database for MariaDB server using PowerShell. A subset of engine configurations is exposed at the server-level and can be modified.

Note

Server parameters can be updated globally at the server-level, use the Azure CLI, PowerShell, or Azure portal.

Prerequisites

To complete this how-to guide, you need:

Important

While the Az.MariaDb PowerShell module is in preview, you must install it separately from the Az PowerShell module using the following command: Install-Module -Name Az.MariaDb -AllowPrerelease. Once the Az.MariaDb PowerShell module is generally available, it becomes part of future Az PowerShell module releases and available natively from within Azure Cloud Shell.

If you choose to use PowerShell locally, connect to your Azure account using the Connect-AzAccount cmdlet.

[!INCLUDE cloud-shell-try-it.md]

List server configuration parameters for Azure Database for MariaDB server

To list all modifiable parameters in a server and their values, run the Get-AzMariaDbConfiguration cmdlet.

The following example lists the server configuration parameters for the server mydemoserver in resource group myresourcegroup.

Get-AzMariaDbConfiguration -ResourceGroupName myresourcegroup -ServerName mydemoserver

For the definition of each of the listed parameters, see the MariaDB reference section on Server System Variables.

Show server configuration parameter details

To show details about a particular configuration parameter for a server, run the Get-AzMariaDbConfiguration cmdlet and specify the Name parameter.

This example shows details of the slow_query_log server configuration parameter for server mydemoserver under resource group myresourcegroup.

Get-AzMariaDbConfiguration -Name slow_query_log -ResourceGroupName myresourcegroup -ServerName mydemoserver

Modify a server configuration parameter value

You can also modify the value of a certain server configuration parameter, which updates the underlying configuration value for the MariaDB server engine. To update the configuration, use the Update-AzMariaDbConfiguration cmdlet.

To update the slow_query_log server configuration parameter of server mydemoserver under resource group myresourcegroup.

Update-AzMariaDbConfiguration -Name slow_query_log -ResourceGroupName myresourcegroup -ServerName mydemoserver -Value On

Next steps

[!div class="nextstepaction"] Auto grow storage in Azure Database for MariaDB server using PowerShell.