This topic describes how to use Data Management (DMS) to connect to a PolarDB-X database. You can connect to a PolarDB-X database by using other methods, such as SQL command line tools, third-party program code that conforms to the official MySQL protocol, and third-party clients such as MySQL Workbench, SQLyog, Sequel Pro, and Navicat for MySQL.

Background information

DMS offers an integrated solution that supports data management, schema management, server management, user authorization, security audit, trend analysis, data tracking, business intelligence (BI) charting, and performance analysis and optimization.

Procedure

  1. Log on to the PolarDB for Xscale console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. On the Instances page, click the PolarDB-X 2.0 tab.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose ConfigurationManagement > Database management.
  6. In the upper-right corner of the page that appears, click Login database.
  7. In the dialog box that is displayed, configure the parameters. The following table describes the parameters.
    ParameterDescription
    Database TypeBy default, the value of this parameter is set to DRDS. You do not need to change the value. PolarDB-X is previously known as Distributed Relational Database Service (DRDS).
    Instance RegionBy default, the region where the current instance is deployed is selected. You do not need to change the value.
    Note If you want to log on to a database in a PolarDB-X instance that is deployed in another region, select the region where the instance is deployed from the drop-down list.
    Instance IDBy default, the ID of the current instance is selected. You do not need to change the value.
    Note If you want to log on to a database in another PolarDB-X instance, select the ID of the instance from the drop-down list.
    DATABASEOptional. The name of the database.
    Database AccountThe username of the account that is used to log on to the database.
    Database passwordThe password of the account.
    Note If you select Remember password, you do not need to enter the username or password of the account the next time you log on to the database.
    Note
    • By default, the control mode is automatically set to Flexible Management the first time you use DMS to log on to the database. You can change the control mode after you log on to the database. For more information, see Modify database instances and Control modes.
    • After you configure the parameters, you can click Test connection in the lower-left corner of the dialog box. If the database fails to be connected, troubleshoot based on the error message. For example, check whether the username or password is correct.
    • DMS automatically adds the IP addresses and CIDR blocks of the DMS servers that are deployed in the same region as the PolarDB-X instance to the IP address whitelist of the instance. If the IP addresses and CIDR blocks fail to be added to the IP address whitelist of the instance, you must manually add them.
  8. Click Login.

What to do next

After you use DMS to connect to your PolarDB-X database, you can execute basic SQL statements. For more information, see Basic SQL operations.