Azure Database for MySQL - Reference
This section provides comprehensive reference documentation for Azure Database for MySQL, including details on Azure CLI commands, Azure PowerShell cmdlets, REST API specifications, and performance metrics.
Azure CLI Commands
Interact with Azure Database for MySQL using the Azure Command-Line Interface (CLI). These commands allow you to manage your MySQL servers, databases, configurations, and more.
The primary command group for Azure Database for MySQL is az mysql
.
Common Commands:
az mysql server create
: Create a new Azure Database for MySQL server.az mysql server list
: List available MySQL servers.az mysql server show
: Show the details of a specific MySQL server.az mysql server update
: Update an existing MySQL server.az mysql server delete
: Delete a MySQL server.az mysql server firewall-rule create
: Create a firewall rule for a server.az mysql server configuration set
: Modify server configuration parameters.
For a complete list of commands and their options, refer to the Azure CLI reference.
--help
flag with any command for detailed usage information. For example: az mysql server create --help
.
Azure PowerShell Cmdlets
Manage Azure Database for MySQL resources programmatically using Azure PowerShell. These cmdlets offer a robust way to automate database management tasks.
Key modules include Az.MySql
.
Example Cmdlets:
New-AzMySqlServer
: Creates a new Azure Database for MySQL server.Get-AzMySqlServer
: Retrieves information about MySQL servers.Set-AzMySqlServer
: Modifies the properties of an existing MySQL server.Remove-AzMySqlServer
: Deletes a MySQL server.New-AzMySqlFirewallRule
: Creates a firewall rule for a server.
Explore the full range of cmdlets in the Azure PowerShell reference.
REST API
The Azure Database for MySQL REST API allows you to manage your MySQL servers and related resources using standard HTTP requests. This is useful for integrating Azure MySQL management into custom applications or scripts.
Key API operations include:
Servers - Create
: Creates a new server.Servers - Get
: Retrieves the details of a server.FirewallRules - CreateOrUpdate
: Creates or updates a firewall rule.Configurations - List
: Lists the server configurations.
Detailed API specifications and examples can be found in the REST API documentation.
Performance Metrics
Monitor the health and performance of your Azure Database for MySQL instances using a comprehensive set of metrics available through the Azure portal, CLI, PowerShell, and Azure Monitor.
Key Metrics to Monitor:
Metric Name | Description | Unit |
---|---|---|
CPU Percentage | The percentage of CPU utilized by the server. | Percent |
Memory Percentage | The percentage of memory utilized by the server. | Percent |
Storage Percentage | The percentage of storage utilized by the server. | Percent |
Connections | The current number of client connections to the server. | Count |
IO Percentage | The percentage of I/O utilized by the server. | Percent |
Replication Lag | The replication lag for read replicas. | Seconds |
Gain deeper insights into performance characteristics and best practices in the Performance Metrics guide.