Updated on 2024-04-18 GMT+08:00

Configuring Data Connections

MRS data connections are used to manage external source connections used by components in a cluster. For example, if Hive metadata uses an external relational database, a data connection can be used to associate the external relational database with the Hive component.

  • Local: Metadata is stored in the local GaussDB of a cluster. When the cluster is deleted, the metadata is also deleted. To retain the metadata, manually back up the metadata in the database in advance.
  • External data connection: After the cluster is created, you can select RDS PostgreSQL database or RDS MySQL database that is associated with the same VPC and subnet as the current cluster. Metadata is stored in the associated database and is not deleted when the current cluster is deleted. Multiple MRS clusters can share the same metadata.

When Hive metadata is switched between different clusters, MRS synchronizes only the permissions in the metadata database of the Hive component. The permission model on MRS is maintained on MRS Manager. Therefore, when Hive metadata is switched between clusters, the permissions of users or user groups cannot be automatically synchronized to MRS Manager of another cluster.

Creating a Data Connection

  1. Log in to the MRS management console, and choose Data Connections in the left navigation pane.
  2. Click Create Data Connection.

    For details about how to configure an RDS data connection, see Creating an RDS Data Connection.

    • RDS PostgreSQL database. Clusters that support Hive can connect to this type of database.
    • RDS MySQL database. Clusters that support Hive or Ranger can connect to this type of database.
    • GaussDB(for MySQL) database. Only clusters of MRS 3.1.2-LTS.3, MRS 3.1.5, and MRS 3.3.0 can connect to this type of database.
    • Currently, MRS supports PostgreSQL 14 on RDS.
    • Currently, MRS supports only MySQL 5.7.x/MySQL 8.0x on RDS.

    For details about how to configure a LakeFormation data connection, see Creating a LakeFormation Connection.

  3. Click OK.

Viewing Data Connection Details

  1. Log in to the MRS management console, and choose Data Connections in the left navigation pane.
  2. In the data connection list, click the desired data connection. On the page that is displayed, view its details.

    For example, the data connection information of the RDS MySQL database is as follows:
    Figure 1 Viewing the data connection information of the RDS MySQL database

Deleting a Data Connection

  1. Log in to the MRS management console, and choose Data Connections in the left navigation pane.
  2. In the Operation column of the data connection list, click Delete in the row where the data connection to be deleted is located. Enter DELETE in the Delete Data Connection dialog box and click OK.

    If the selected data connection has been associated with a cluster, the deletion does not affect the cluster.

Configuring a Data Connection During Cluster Creation

  1. Go to the Buy Cluster page.
  2. Click the Custom Config tab.
  3. When you create a cluster, Data Connection Type can only be set to Local database. For details about how to configure other parameters, see Buying a Custom Cluster.