New-AzMySqlServer
Creates a new server.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzMySqlServer
-Name <String>
-ResourceGroupName <String>
-AdministratorLoginPassword <SecureString>
-AdministratorUserName <String>
-Location <String>
-Sku <String>
[-SubscriptionId <String>]
[-BackupRetentionDay <Int32>]
[-GeoRedundantBackup <GeoRedundantBackup>]
[-MinimalTlsVersion <MinimalTlsVersionEnum>]
[-SslEnforcement <SslEnforcementEnum>]
[-StorageAutogrow <StorageAutogrow>]
[-StorageInMb <Int32>]
[-Tag <Hashtable>]
[-Version <ServerVersion>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Creates a new server.
Examples
Example 1: Create a new MySql server
PS C:\> New-AzMySqlServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Location eastus -AdministratorUser mysql_test -AdministratorLoginPassword $password -Sku GP_Gen5_4
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- ------------
mysql-test eastus mysql_test 5.7 5120 GP_Gen5_4 GeneralPurpose Enabled
These cmdlets create a new MySql server.
Parameters
The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.
| Type: | SecureString |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Administrator username for the server. Once set, it cannot be changed.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Run the command as a job.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Backup retention days for the server. Day count is between 7 and 35.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | PSObject |
| Aliases: | AzureRMContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable Geo-redundant or not for server backup.
| Type: | GeoRedundantBackup |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The location the resource resides in.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
| Type: | MinimalTlsVersionEnum |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the server.
| Type: | String |
| Aliases: | ServerName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Run the command asynchronously.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable ssl enforcement or not when connect to server.
| Type: | SslEnforcementEnum |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable Storage Auto Grow.
| Type: | StorageAutogrow |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Max storage allowed for a server.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The subscription ID that identifies an Azure subscription.
| Type: | String |
| Position: | Named |
| Default value: | (Get-AzContext).Subscription.Id |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Application-specific metadata in the form of key-value pairs.
| Type: | Hashtable |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Server version.
| Type: | ServerVersion |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Outputs
Notes
ALIASES