This topic describes how to access a host that is deployed in an ApsaraDB for MyBase dedicated cluster.

You can use the following methods to access a host:

Access a host from a bastion host

Prerequisites

Procedure

  1. Log on to the Bastionhost console.
  2. Find the bastion host that you want to enable and click Run on the right to enable the bastion host.
    Enable a bastion hosts
  3. After the bastion host is enabled, return to the ApsaraDB for MyBase console. Find the dedicated cluster that you want to connect to, and go to the Bastion Hosts page. On the page that appears, find the bastion host that you want to use, and click Associate with Bastion Host.
    Associate with a bastion host
  4. Click Import Host. In the dialog box that appears, click Import.
    Select the host
  5. Find the host that you want to import, and click Add an account in the Host Account column to create a host account.
    Host accountCreate a host account
  6. Select the host for which you want to create an account and click Next.
    Next
  7. Click Create Bastion Host Account. In the dialog box that appears, specify the required information and click Create.
    Create an account
  8. Click Authorize Host in the Actions column. In the dialog box that appears, select the required host and click Authorize Host.
    Authorize a hostSelect the host
  9. Log on to the Bastionhost instance by running the ssh command on the terminal. Use the following command syntax:
    ssh <Username>@<Bastion host operations and maintenance (O&M) address> -p<Bastion host port>
    Note
    • Set Username to the bastion host account that is created in Step 7.
    • Set Bastion host O&M address to the public O&M address of the bastion host.
    • Set Bastion host port to the port number of the bastion host. The default port number is 60022.

    Example

    ssh test@wddxxxxxx-public.bastionhost.aliyuncs.com -p60022
  10. Enter the password of the bastion host account.
  11. Move the pointer to select the required host and press Enter.

Use a webshell to access a host

Prerequisites

  • The Grant OS Permissions parameter is set to Enabled when you create the ApsaraDB for MyBase dedicated cluster.
  • A MyBase for MySQL host is created. For more information, see Add hosts to a MyBase for MySQL dedicated cluster.
  • MySQL High-availability Edition is used.

Procedure

  1. Log on to the ApsaraDB for MyBase console.
  2. In the top navigation bar, select the deployment region.
    Select a region
  3. Find the dedicated cluster in which the host that you want to access is deployed and click Details in the Actions column.
  4. In the left-side navigation pane, click Hosts.
  5. Find the host that you want to access and click Details in the Actions column.
  6. On the Host Information tab, click Remote Connection.
    Connect to the host
    Note The system automatically connects to the host from the server. You do not need to enter your account or password.