A HybridDB for MySQL connection allows you to read data from and write data to HybridDB for MySQL by using HybridDB for MySQL Reader and Writer. You can configure sync nodes for HybridDB for MySQL by using the codeless user interface (UI) or code editor.
Workspaces in standard mode support the connection isolation feature. You can add connections for the development and production environments separately and isolate the connections to protect your data security.
- User-created MySQL data store
- You can configure sync nodes that involve such connections. However, connectivity testing is not supported. You can click Complete without testing the connectivity.
- You must run such sync nodes on custom resource groups. Make sure that the custom resource groups can connect to the data stores.
- HybridDB for MySQL data store: You do not need to select the network type, because DataWorks automatically identifies the network type based on the information you enter for the HybridDB for MySQL instance.
Procedure
- Log on to the DataWorks console as a workspace administrator, find the target workspace, and then click Data Integration in the Actions column.
- In the left-side navigation pane, click Connection to go to the page.
- On the Data Source page, click Add Connection in the upper-right corner.
- In the Add Connection dialog box that appears, click HybridDB for MySQL in the Relational Database section.
- In the Add HybridDB for MySQL connection dialog box that appears, set the parameters.
The HybridDB for MySQL connection type can be set to ApsaraDB for AnalyticDB or JDBC Connection Mode.
- The following table describes the parameters that appear after you set Connect To to .
Parameter Description Connect To The type of the connection. Here, set the value to .Connection Name The name of the connection. The name can contain letters, digits, and underscores (_) and must start with a letter. Description The description of the connection. Applicable Environment The environment in which the connection is used. Valid values: Development and Production. Instance ID The ID of the HybridDB for MySQL instance. You can view the ID in the HybridDB for MySQL console. Tenant Account ID The ID of the Alibaba Cloud account used to purchase the HybridDB for MySQL instance. You can view your account ID on the Security Settings page after logging on to the Alibaba Cloud console with your Alibaba Cloud account. Username The username for logging on to the database. Password The password for logging on to the database. - The following table describes the parameters that appear after you set Connect To to .
Parameter Description Connect To The type of the connection. Here, set the value to .Connection Name The name of the connection. The name can contain letters, digits, and underscores (_) and must start with a letter. Description The description of the connection. The description cannot exceed 80 characters in length. Applicable Environment The environment in which the connection is used. Valid values: Development and Production. Note This parameter is available only when the workspace is in standard mode.JDBC URL The Java Database Connectivity (JDBC) URL of the database, in the format of jdbc:mysql://ServerIP:Port/Database
.Username The username for logging on to the database. Password The password for logging on to the database.
- The following table describes the parameters that appear after you set Connect To to .
- Click Test Connection.
- After the connectivity test is passed, click Complete.
Note on connectivity testing
- If the data store is a user-created one deployed on Elastic Compute Service (ECS) instances that reside on a classic network, we recommend that you use a custom resource group to run sync nodes that use the connection. The default resource group does not guarantee that it can connect to the data store over the network.
- If the data store is deployed in a VPC and you configure the connection in instance mode, the connectivity test checks whether the instance ID, account ID, username, and password you entered are correct.
- In a VPC, if you use an internal address as the JDBC URL to configure the connection, the connectivity test will fail.
- If you use a public address as the JDBC URL to configure the connection, the connectivity test checks whether the JDBC URL, username, and password you entered are correct.
What to do next
Now you have learned how to configure a HybridDB for MySQL connection. You can proceed with the next tutorial. In the next tutorial, you will learn how to configure HybridDB for MySQL Reader and Writer. For more information, see Configure HybridDB for MySQL Reader.