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

Sharing a DB Instance with Others

If you have a DB instance and want to share it with another account or another user of the same account, but you do not want the account or user to know the password of the shared login or to view other DB instances in your account besides the shared one, you can choose to share the login details of one of your DB instances.

Prerequisites

  • You have two accounts or one account with two IAM users.
  • You have obtained IDs of the IAM users.

Precautions

  • Users that you share your DB instance logins with cannot add databases or users.
  • Data tracking and rollback and background tasks are not available to the DB instances whose login information you have shared with other users.

Viewing the UID of the Shared Account

  1. Log in to the management console as an IAM user.
  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 the DB Instance Logins Shared by Others tab.

    Figure 1 DB instance logins shared by others

  6. Click View My User ID. On the displayed page, copy the user ID.

    Figure 2 Viewing my user ID

Sharing a DB Instance with Others

  1. Log in to the management console using a Huawei Cloud account.
  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. On the My DB Instance Logins tab, locate the login you want to share and click the number in the Additional Users column.

    Figure 3 Database list

  6. On the displayed View Additional Users page, click Add User.

    Figure 4 Viewing users of the shared login

  7. On the displayed Add User page, select an adding method.

    • Manual input: Enter the ID of the user that you want to share your DB instance login with. If multiple users need to be added, separate their IDs with semicolons (;).
      Figure 5 Manually entering a user
    • Synchronize IAM account: Select another IAM user of the current account. You can also use the UID to quickly search for shared user information.
      Figure 6 Synchronizing IAM users
    • Synchronize EPS user: Specify an account and group and select required users.
      Figure 7 Synchronizing EPS users

  8. Confirm the settings and click OK.
  9. Use the shared account to log in to the management console and check whether the shared login is found in the instance list on the DB Instance Logins Shared by Others tab page.

    Figure 8 Successful addition