Updated on 2024-08-07 GMT+08:00

Preparations

Creating the rf_admin_trust Agency

  1. Log in to Huawei Cloud management console, move your mouse over the account name, and choose Identity and Access Management.

    Figure 1 Console page
    Figure 2 Identity and Access Management

  2. Choose Agencies in the left navigation pane and search for the rf_admin_trust agency.

    Figure 3 Agency list
    • If the agency is found, skip the following steps.
    • If the agency is not found, perform the following steps to create it.

  3. Click Create Agency in the upper right corner of the page. On the displayed page, enter rf_admin_trust for Agency Name, select Cloud service for Agency Type, enter RFS for Cloud Service, and click Next.

    Figure 4 Create Agency

  4. Search for Tenant Administrator and select it in the search results.

    Figure 5 Selecting a policy

  5. Select All resources and click OK.

    Figure 6 Setting the authorization scope

  6. Check that the rf_admin_trust agency is created in the agency list.

    Figure 7 Agency list

Obtaining an Authorization Code

When MHA performs a failover or stops working due to an error, you can execute send_report to obtain the failover report by an email. In this way, users can learn about the current database status in time. In this solution, emails are sent through SMTP. You need to log in to the mailbox to enable SMTP. In addition, an independent password or authorization code is required for sending emails. Perform the following operations in this section to obtain the authorization code. The Outlook mailbox is used as an example.

  1. Log in to your mailbox. Click the Settings icon in the upper right corner and click View all Outlook settings.

    Figure 8 Settings

  2. Choose Sync email on the left, select Yes and Let apps and devices to delete messages from Outlook (if required). View and record the value of Server name.

    Figure 9 Sync email

  3. Click the avatar in the upper right corner and click My profile.

    Figure 10 My profile

  4. Choose safe on the top menu bar. On the displayed page, click Get started now.

    Figure 11 safe

  5. After the system verification is successful, click Manage under Two-step verification, perform required operations to enable Two-step verification.

    Figure 12 Two-step verification

  6. In the Additional security options area, verify that the status of Two-step verification is Open.

    Figure 13 Two-step verification

  7. In the App passwords area, click Create a new app password to set a password for connecting to a third-party application.

    Figure 14 App passwords

  8. Obtain the authorization code and enter it in the text box of email_authorization_code.

    Figure 15 Obtaining an authorization code

    By default, SMTP is disabled for Outlook. To send emails over SMTP, enable it in advance.