共用方式為


Get-AzMySqlFlexibleServerDatabase

取得資料庫的相關資訊。

語法

List (預設值)

Get-AzMySqlFlexibleServerDatabase
    -ResourceGroupName <String>
    -ServerName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzMySqlFlexibleServerDatabase
    -Name <String>
    -ResourceGroupName <String>
    -ServerName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzMySqlFlexibleServerDatabase
    -InputObject <IMySqlIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

取得資料庫的相關資訊。

範例

範例 1:依資源名稱取得 MySQL 資料庫

Get-AzMySqlFlexibleServerDatabase -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -Name flexibleserverdb
Name             Charset     Collation
----             -------- ------------------
flexibleserverdb utf8     utf8_general_ci

此 Cmdlet 會依資源名稱取得 MySql 伺服器。

範例 2:依身分取得 MySql 資料庫

$ID = "/subscriptions/<SubscriptionId>/resourceGroups/PowershellMySqlTest/providers/Microsoft.DBforMySQL/flexibleServers/mysql-test"
Get-AzMySqlFlexibleServerDatabase -InputObject $ID
Name               Charset Collation
----               ------- ---------
information_schema utf8    utf8_general_ci
flexibleserverdb   utf8    utf8_general_ci
mysql              latin1  latin1_swedish_ci
performance_schema utf8    utf8_general_ci
sys                utf8    utf8_general_ci

此 Cmdlet 會依身分識別取得 MySql 伺服器。

範例 3:列出指定伺服器中的所有 MySQL 資料庫

Get-AzMySqlFlexibleServerDatabase -ResourceGroupName PowershellMySqlTest -ServerName mysql-test
Name               Charset Collation
----               ------- ---------
information_schema utf8    utf8_general_ci
flexibleserverdb   utf8    utf8_general_ci
mysql              latin1  latin1_swedish_ci
performance_schema utf8    utf8_general_ci
sys                utf8    utf8_general_ci

此 Cmdlet 會列出指定伺服器中的所有 MySql 伺服器。

參數

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

參數屬性

類型:PSObject
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzureRMContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

參數屬性

類型:IMySqlIdentity
預設值:None
支援萬用字元:False
不要顯示:False

參數集

GetViaIdentity
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

資料庫的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:DatabaseName

參數集

Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

List
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ServerName

伺服器的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

List
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SubscriptionId

目標訂用帳戶的標識碼。

參數屬性

類型:

String[]

預設值:(Get-AzContext).Subscription.Id
支援萬用字元:False
不要顯示:False

參數集

List
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
Get
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

IMySqlIdentity

輸出

IDatabaseAutoGenerated