Before connecting to a host in your ApsaraDB for MyBase dedicated cluster, create a host account. Two methods are available depending on your database engine and whether you use a bastion host.
| Method | Supported engines | Requirements |
|---|---|---|
| Associate with Bastion Host page | MySQL, SQL Server, PostgreSQL | A Bastionhost instance is already created |
| Host details page | SQL Server only | No bastion host required |
OS permissions must be granted when you create the dedicated cluster. If you skipped this step, re-create the cluster with OS permissions enabled. For details, see Create a dedicated cluster.
Create a host account on the Associate with Bastion Host page
Prerequisites
Before you begin, ensure that you have:
A dedicated cluster running MySQL, SQL Server, or PostgreSQL, with OS permissions granted
A Bastionhost instance. For details, see Create a bastion host
Procedure
Log on to the Bastionhost console. Find the bastion host and click Run to enable it. For details, see Enable a bastion host.

Log on to the ApsaraDB for MyBase console. In the upper-left corner, select a region.
Find the dedicated cluster and click Details in the Actions column.
In the left-side navigation pane, click Bastion Hosts. Find the bastion host and click Associate with Bastion Host in the Actions column.

Click Import Host
Find the ApsaraDB for MyBase host and click Add an account in the Host Account column.

In the Create Host Account dialog box, configure the parameters.
Parameter Description Example Username Lowercase letters, digits, and underscores ( _). Must start with a lowercase letter and end with a lowercase letter or digit. Length: 2–16 characters. Cannot beroot,admin, or other reserved names.dbadminAccount type Available only for SQL Server clusters. Select Standard Account or Administrator. For details about permissions, see Host permissions. Standard Account Password At least three of: uppercase letters, lowercase letters, digits, and special characters ( ! @ # $ % ^ & * ( ) _ + - =). Length: 6–32 characters. For SQL Server clusters, the password cannot contain the username (case-insensitive).MyPass@2024
Click Create.
After creating the account, edit or delete it in the Bastionhost console. For details, see Configure account information for a host.
Create a host account on the host details page
This method applies to SQL Server clusters only. No bastion host is required.
Prerequisites
Before you begin, ensure that you have:
A dedicated cluster running SQL Server, with OS permissions granted
Procedure
Log on to the ApsaraDB for MyBase console. In the upper-left corner, select a region.
In the left-side navigation pane, click Hosts.
Find the host and click Details in the Actions column.
On the Host Information tab, click Create and configure the parameters.
Parameter Description Example Username Lowercase letters, digits, and underscores ( _). Must start with a lowercase letter and end with a lowercase letter or digit. Length: 2–16 characters. Cannot beroot,admin,test, or other reserved names.dbadminAccount type Select the account type. For details about permissions, see Host permissions. — Password At least three of: uppercase letters, lowercase letters, digits, and special characters ( ! @ # $ % ^ & * ( ) _ + - =). Length: 8–32 characters. The password cannot contain the username (case-insensitive).MyPass@2024Click Create.
After creating the account, edit or delete it on the Host Information tab. For details, see Manage a host account.
API reference
| Operation | Description |
|---|---|
| CreateDedicatedHostAccount | Creates a host account |
| ModifyDedicatedHostAccount | Changes the username and password of a host account |
| DeleteDedicatedHostAccount | Deletes a host account |
What's next
After creating a host account, connect to the host: