Azure CLI samples for Azure Database for MariaDB
Important
Azure Database for MariaDB is on the retirement path. We strongly recommend that you migrate to Azure Database for MySQL. For more information about migrating to Azure Database for MySQL, see What's happening to Azure Database for MariaDB?.
You can configure Azure SQL Database for MariaDB by using the Azure CLI.
If you don't have an Azure subscription, create an Azure free account before you begin.
Prerequisites
Use the Bash environment in Azure Cloud Shell. For more information, see Quickstart for Bash in Azure Cloud Shell.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
Samples
The following table includes links to sample Azure CLI scripts for Azure Database for MariaDB.
Sample link | Description |
---|---|
Create a server with firewall rule | |
Create a server and firewall rule | Azure CLI script that creates a single Azure Database for MariaDB server and configures a server-level firewall rule. |
Create script with vNet rules | Azure CLI that creates an Azure Database for MariaDB server with a service endpoint on a virtual network and configures a vNet rule. |
Scale a server | |
Scale a server | Azure CLI script that scales a single Azure Database for MariaDB server up or down to allow for changing performance needs. |
Change server configurations | |
Change server configurations | Azure CLI script that change configurations of a single Azure Database for MariaDB server. |
Restore a server | |
Restore a server | Azure CLI script that restores a single Azure Database for MariaDB server to a previous point in time. |
Manipulate with server logs | |
Enable server logs | Azure CLI script that enables server logs of a single Azure Database for MariaDB server. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for