Azure CLI samples for Azure Database for MySQL - Flexible Server

APPLIES TO: Azure Database for MySQL - Flexible Server

The following table includes links to sample Azure CLI scripts for Azure Database for MySQL flexible server.

Sample link Description
Create and connect to a server
Create a server and enable public access connectivity Creates an Azure Database for MySQL flexible server instance, configures a server-level firewall rule (public access connectivity method) and connects to the server.
Create a server and enable private access connectivity (VNet Integration) Creates an Azure Database for MySQL flexible server instance in a VNet (private access connectivity method) and connects to the server through a VM within the VNet.
Monitor and scale
Monitor metrics and scale a server Monitors and scales a single Azure Database for MySQL flexible server instance up or down to allow for changing performance needs.
Backup and restore
Restore a server Restores a single Azure Database for MySQL flexible server instance to a previous point in time.
High Availability
Configure zone-redundant high availability Enables Zone-Redundant high availability while creating an Azure Database for MySQL flexible server instance.
Configure same-zone high availability Enables Same-Zone high availability while creating an Azure Database for MySQL flexible server instance.
Manage server
Restart, Stop, Start a Server Performs restart, stop and start operations on a single Azure Database for MySQL flexible server instance.
Change server parameters Changes server parameters of a single Azure Database for MySQL flexible server instance.
Replication
Create read replicas Creates and manages read replicas in a single Azure Database for MySQL flexible server instance.
Configure logs
Configure audit logs Configures audit logs on a single Azure Database for MySQL flexible server instance.
Configure slow-query logs Configures slow-query logs on a single Azure Database for MySQL flexible server instance.