New-AzMySqlFlexibleServerDatabase
Creates a new database or updates an existing database.
In this article
Syntax
New-AzMySqlFlexibleServerDatabase
-Name
-ResourceGroupName
-ServerName
[-SubscriptionId ]
[-Charset ]
[-Collation ]
[-DefaultProfile ]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[]
New-AzMySqlFlexibleServerDatabase
-InputObject
[-Charset ]
[-Collation ]
[-DefaultProfile ]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[]
Description
Creates a new database or updates an existing database.
Examples
Example 1: Create a new MySql server database
PS C:\> New-AzMySqlFlexibleServerDatabase -Name databasetest -ResourceGroupName PowershellMySqlTest -ServerName mysql-test
Name Charset Collation
---- -------- ------------------
databasetest latin1 latin1_swedish_ci
Create a database with default settings.
Parameters
-AsJob
Run the command as a job
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Charset
The charset of the database.
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Collation
The collation of the database.
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm
Prompts you for confirmation before running the cmdlet.
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type:Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name
The name of the database.
Aliases:DatabaseName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NoWait
Run the command asynchronously
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerName
The name of the server.
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubscriptionId
The ID of the target subscription.
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Inputs
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity
Outputs
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabase
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: The name of the server configuration.
[DatabaseName ]: The name of the database.
[FirewallRuleName ]: The name of the server firewall rule.
[Id ]: Resource identity path
[KeyName ]: The name of the server key.
[LocationName ]: The name of the location.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SecurityAlertPolicyName ]: The name of the security alert policy.
[ServerName ]: The name of the server.
[SubscriptionId ]: The ID of the target subscription.
[VirtualNetworkRuleName ]: The name of the virtual network rule.