Help Center/ Cloud Bastion Host/ User Guide/ Resource Operation/ Host Resource Operation/ Logging In to and Maintaining Database Resources Using a Local Client
Updated on 2025-09-29 GMT+08:00

Logging In to and Maintaining Database Resources Using a Local Client

You can use a local client tool to log in to and maintain MySQL and PostgreSQL databases on macOS to audit database O&M. This section uses Navicat as an example to describe how to log in to MySQL and PostgreSQL databases on macOS for O&M.

Notes

During O&M, bastion hosts automatically record videos for audit. To prevent sensitive information leakage, do not enter sensitive information that is displayed in plaintext during O&M.

Constraints

  • The database operation audit is available only in professional editions.
  • You can log in to MySQL and PostgreSQL databases on macOS only by using the method described in this section.
  • To prevent network faults or network configuration problems from affecting the login to the system, enable the ports bound to the security group of the CBH system by referring to Table 1. For more details, see How Do I Configure a Security Group for a CBH Instance?.
    Table 1 Port configuration requirements

    Database Type

    Port

    MySQL

    • Inbound: 33306 and 62222
    • Outbound: 3306

    PostgreSQL

    • Inbound: 15432 and 62222
    • Outbound: 5432
  • Only some database clients are supported. For details, see Table 2.
    Table 2 Supported database types, versions, and clients

    Database Type

    Version

    Supported Client

    MySQL

    MySQL 5.5, 5.6, 5.7, and 8.0

    • Navicat 17 or later
    • DBeaver 25 or later

    PostgreSQL

    11, 12, 13, 14, and 15

    If you need to use a client tool to perform O&M for PostgreSQL databases, add the sslmode attribute to the connection attributes in Database > Driver Manager and save the value as disable.

Prerequisites

  • You have the management permissions for the Host Operations module.
  • You have obtained the access permissions for the resources.
  • You have installed the client tool.
  • The network connection between the managed host and the system is normal, and the account username and password for logging in to the managed host are correct.

Procedure

  1. Log in to your bastion host.
  2. Choose Operation > Host Operations to go to the Host Operations page.
  3. Set Operation Type to Master/slave Account.

    1. In the upper right corner on the Host Operations page, click Web OPS Settings.
    2. Click the Database tab.
    3. Set Operation Type to Master/slave Account and click OK.
    Figure 1 Configuring operation type

  4. Select a host with protocol type set to MySQL or PostgreSQL and click Login in the Operation column.

    Complete 5 based on the information in the displayed window.
    Figure 2 Login information

  5. Open the local client tool, configure login information, and log in to the database.

    Take the Navicat client as an example. Create a connection, configure the connection on the General and SSH tabs based on the login information in 4, and then connect to the database.

    Figure 3 Configuration example