You can connect to an AnalyticDB for MySQL cluster by using Data Management (DMS), a business intelligence (BI) visualization tool, the MySQL command line tool, or a MySQL client such as Navicat for MySQL, DBeaver, DbVisualizer, or SQL Workbench/J. You can also enter information such as the endpoint, port, and database account of an AnalyticDB for MySQL cluster in your application to connect to the cluster.

Background information

DMS is a graphical data management tool provided by Alibaba Cloud. You can use DMS to manage relational databases and NoSQL databases. DMS provides features such as data management, SQL operations, data import and export, database cloning, database performance optimization, and security audit.

Use DMS to connect to AnalyticDB for MySQL

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select a region.
  3. In the left-side navigation pane, click Clusters.
  4. On the Data Warehouse Edition (V3.0) tab, find the cluster that you want to manage and click the Cluster ID.
  5. On the Cluster Information page, click Log On to Database in the upper-right corner.
  6. In the dialog box that appears, specify the parameters.
    ParameterDescription
    Database TypeBy default, ADB3.0-MySQL is automatically selected.
    Instance RegionBy default, the region where the cluster is deployed is automatically selected.
    Note If you want to log on to an AnalyticDB for MySQL cluster that is located in another region, select the region of the cluster from the drop-down list.
    Instance IDBy default, the ID of the current cluster is automatically selected.
    Note If you want to log on to another AnalyticDB for MySQL cluster, select the ID of the cluster from the drop-down list.
    Database AccountThe username used to log on to the cluster.
    Database PasswordThe password used to log on to the cluster.
    Note You can select Remember password. This way, the next time you log on to the current AnalyticDB for MySQL cluster, you do not need to enter the username and password again.
    Note
    • The first time you log on to the AnalyticDB for MySQL cluster by using DMS, the data in the cluster is managed in Flexible Management mode. You can modify the control mode by editing the cluster. For more information, see Modify an instance and Control modes.
    • After the parameters are configured, you can click Test connection in the lower-left corner of the dialog box. If the connection fails, follow the instructions to check the information you entered, such as the username or password.
    • DMS adds its own IP addresses and CIDR blocks for the specified region to the whitelist of IP addresses that are allowed to connect to the AnalyticDB for MySQL cluster. If the IP addresses and CIDR blocks fail to be added, manually add them. For more information, see Configure a whitelist and Configure an IP address whitelist.
  7. Click Login.

Use code to connect to AnalyticDB for MySQL during application development

Use the MySQL command-line tool to connect to AnalyticDB for MySQL

Use the MySQL command-line tool to connect to AnalyticDB for MySQL

Use a client to connect to AnalyticDB for MySQL

Connect AnalyticDB for MySQL to a data visualization tool