mysql new database_New-AzMySqlFlexibleServerDatabase (Az.MySql) | Microsoft Docs

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值