Configuring an RDS Data Connection
Preparations
- Log in to the RDS management console.
- Buy an RDS DB instance.
- In the left navigation pane of the RDS management console, choose Instances. Locate the row containing the RDS DB instance used by MRS data connections, click More in the Operation column, and select Log In to log in to the DB instance as user root.
- On the home page of the instance, click Create Database to create a database.
If no new database is created, the MRS data connections will fail to configure.
- On the top of the page, choose Account Management > User Management.
- Click Create User to create a non-root user.
- On the top of the page, choose SQL Operations > SQL Query, switch to the target database by database name, and run the following SQL statements to grant permissions to the database user. In the following statements, ${db_name} and ${db_user} indicate the name of the database to be connected to MRS and the name of the new user, respectively.
grant SELECT, INSERT on mysql.* to '${db_user}'@'%' with grant option; grant all privileges on ${db_name}.* to '${db_user}'@'%' with grant option; grant reload on *.* to '${db_user}'@'%' with grant option; flush privileges;
- Create a data connection by referring to Creating an RDS Data Connection.
Creating an RDS Data Connection
Create an RDS data connection for an existing MRS cluster.
- Log in to the MRS management console, and choose Data Connections in the left navigation pane.
- Click Create Data Connection.
- Configure parameters according to Table 1.
Table 1 Parameters for creating a data connection Parameter
Description
Type
The type of an external source connection. Value options are as follows:
- RDS MySQL database. Clusters that support Hive or Ranger can connect to this type of database.
Name
The name of a data connection.
Database Instance
The RDS database instance. This instance must be created in RDS before being referenced here, and the database must have been created. For details, see Preparations. Click View DB Instance to view the created DB instances.
NOTE:- To ensure network communications between the cluster and the PostgreSQL database, create the instance in the same VPC and subnet as the cluster.
- The inbound rule of the security group of the RDS DB instance must allow access of the instance to port 3306. To configure that, click the instance name on the RDS console to go to the instance management page. In the Connection Information area, click the name next to Security Group. On the page that is displayed, click the Inbound Rules tab, and click Add Rule. In the displayed Add Inbound Rule dialog box, in the Protocol & Port area, select TCP and enter port number 3306. In the Source area, select IP address and enter the IP addresses of all nodes where the MetaStore instances of Hive are located.
- Currently, MRS supports PostgreSQL 14 on RDS.
- Currently, MRS supports only MySQL 5.7.x/MySQL 8.0x on RDS.
Database
The name of the database to be connected to.
Username
The username for logging in to the database to be connected.
Password
The password for logging in to the database to be connected.
When Type is set to RDS MySQL database or GaussDB(for MySQL), Username must be root. If the user is not root, perform operations by referring to Preparations.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot