Before you manage data in a database, you must connect to the database. This topic describes how to connect to a database by using Data Management (DMS).


An AnalyticDB for PostgreSQL instance is created. For more information, see Create a privileged account.


  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select the region where the instance resides.
  3. Find the instance that you want to manage and click its ID.
  4. Click Log On to Database in the upper-right corner.
  5. Optional:The first time you use DMS, you must authorize DMS to access AnalyticDB for PostgreSQL resources. Click Go to RAM role authorization and grant permissions. For more information, see Authorize DMS to access Alibaba Cloud resources.
  6. In the Log on to Database Instance dialog box, specify Database Account and Database password.
  7. Click Login.
  8. Perform the following operations to access a schema and manage data:
    1. In the left-side navigation pane of the DMS console, click Instances Connected.
    2. Click the instance that you want to manage.
    3. Click the database that you want to manage. In this topic, the database and the created privileged account share the same name.
      For example, the test_user privileged account and the test_user database are used.
    4. Double-click the schema that you want to manage to go to the SQLConsole tab. In this topic, the public schema is used.
    Connect to a database by using DMS


AnalyticDB for PostgreSQL is fully compatible with the message-based protocol of PostgreSQL. You can connect to an instance by using tools that support the protocol. For more information about how to connect to an instance by using client tools, see Use client tools to connect to an instance.

What to do next

Write data to a database