nav-img
Advanced

Logging In to Databases Shared by Others

Scenarios

You have a database instance and want to share it with another account or another user of the same account, but you do not want this other account or user to know the password of the shared login, or view your database instances besides the shared one.

Prerequisites

  • There are two accounts, or one account and two IAM users.
  • You have obtained the UID (user ID) of the IAM user.
  • You have logged in to the DAS console.

Constraints

  • Users having shared database logins cannot add databases or users.
  • Shared databases do not have the data tracking, rollback, and background task features.

Procedure

  1. Log in to the DAS console using the username and password of the user who want to share logins.
  2. On the DAS overview page, click Go to Standard Edition.
  3. In the right pane, click the Database Logins Shared by Others tab.

    Figure 1 Database Logins Shared by Others


  4. Click View My UID and copy it to the local PC.

    Figure 2 My UID


  5. Log in to the DAS console using the username and password of the account.
  6. On the DAS overview page, click Go to Standard Edition.
  7. On the My Database Logins tab, locate the login you want to share and click the number in the Sharers column.

    Figure 3 Login list


  8. On the displayed Add Sharer page, click Add Sharing.

    Figure 4 Viewing users of the shared login


  9. On the displayed Add Sharer page, select the adding method.

    Figure 5 Add Sharer


    • Manual input: Enter the UIDs of users who want to share databases. If multiple users need to be added, separate their UIDs with semicolons (;).
    • Synchronize IAM account: Select another IAM user of the current Haccount.
    • Synchronize EPS user: Select the target users from the group of the enterprise project.

  10. Confirm the settings and click OK.
  11. Return to the DAS console and check whether the users are successfully added.

    Figure 6 Added successfully


  12. Click Log In to log in to the shared database.
  13. Click DB Instance Logins that IAM Users Share with Others and view the information about the shared DB instance.

    • You can view the sharer, sharee, shared DB instance, DB engine version, DB source, login username, and creation time.
    • You can also click Remove in the Operation column to cancel the sharing of the DB instance.