Updated on 2024-01-31 GMT+08:00

Step 1: Add DB Instance Login Information

Before logging in to a DB isntance built on a Huawei Cloud ECS, you need to add a DB instance login. A created DB instance login can be modified or deleted.

Precautions

  • If you have not logged in to a DB instance using a created login for over a year, the system will automatically delete all data of the login, including the saved password.
  • You can log in to a DB instance either on the DAS console or using other clients. These two methods do not affect each other.

Adding a Login

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane on the left, choose Development Tool.

    You can also click Go to Development Tool on the overview page.

  5. Click Add Login.

    Figure 1 Adding a login

  6. Configure login information.

    Figure 2 Configuring login information
    Table 1 Parameter description

    Parameter

    Description

    Example Value

    DB Engine

    DB engine for the instance that you want to add login information for.

    MySQL

    Source Database

    The following types of databases are supported:

    • MySQL 5.5, 5.6, 5.7, and 8.0 instances.
    • PostgreSQL 9.4, 9.5, 9.6, 10, 11 and 12 instances.
    • SQL Server 2008, 2012, 2014, 2016, and 2017 instances are supported. HA clusters are not supported.

    ECS

    Port

    When Source Database is set to ECS, you need to enter a port number for the instance that you select.

    Ensure that the security group of the ECS allows access to this port. To avoid conflicts with reserved ports, you are advised to enter a port number ranging from 1024 to 65535.

    3306

    Login Username

    Username for logging in to the selected DB instance.

    The user must have the permission to allow DAS to access the selected DB instance using an IP address.

    root

    Password

    Password for logging in to the selected DB instance.

    You can select Remember Password. With this function enabled, you do not need to enter the password when you want to log in to the DB instance later.

    -

    Description

    This parameter is optional.

    -

    Collect Metadata Periodically

    If this function is enabled, DAS saves only structured data, including database names, table names, and column names in the instance. Table data is not included. Metadata is collected at 00:00 every day by default.

    You are advised to enable Collect Metadata Periodically. If it is disabled, DAS obtains only the structured data from databases in real time, and the performance of databases is affected.

    The collection time cannot be customized. Once Collect Metadata Periodically is enabled, DAS collects metadata at 20:00 every day (UTC time). If you are not using the UTC time, convert the time based on your local time zone. You can also click Collect Now to collect metadata at any time you want.

    Enabling Collect Metadata Periodically

    Show Executed SQL Statements

    If this function is enabled, all the SQL statements executed in the SQL window will be saved.

    You are advised to enable Show Executed SQL Statements. With it enabled, you can choose SQL Operations > SQL History to see what SQL statements you have executed and can re-execute any executed SQL statements rather than entering them again.

    Enabling Show Executed SQL Statements

  7. After the DB instance information is configured, click Test Connection on the right of the password text box.

    • If the connection test is successful, go to 8.
    • If a message is displayed indicating a connection test failure and failure causes, modify DB instance information based on the message and then go to 8.

  8. After the connection test is successful, click OK.
  9. On the My DB Instance Logins page, view login information of the new DB instance.

    You can also click Modify in the Operation column to modify the instance login information, or click Delete to delete unnecessary instance login information.