你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzMySqlFlexibleServerDatabase
获取有关数据库的信息。
语法
Get-AzMySqlFlexibleServerDatabase
-ResourceGroupName <String>
-ServerName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMySqlFlexibleServerDatabase
-Name <String>
-ResourceGroupName <String>
-ServerName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMySqlFlexibleServerDatabase
-InputObject <IMySqlIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
获取有关数据库的信息。
示例
示例 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 |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
类型: | IMySqlIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
数据库的名称。
类型: | String |
别名: | DatabaseName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组的名称。 名称不区分大小写。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ServerName
服务器的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
目标订阅的 ID。
类型: | String[] |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |