Associate an AnalyticDB for MySQL (V3.0) resource
To develop and manage tasks for AnalyticDB for MySQL (V3.0) in DataWorks, bind your AnalyticDB for MySQL (V3.0) cluster to a DataWorks workspace as a computing resource. Once bound, you can use it in various DataWorks features to connect to the cluster for operations such as data synchronization, data development, and data analysis.
Prerequisites
You have created an AnalyticDB for MySQL (V3.0) cluster.
NoteWe recommend that you create the AnalyticDB for MySQL (V3.0) cluster in the same Region as your DataWorks workspace. If the regions are different, you cannot bind the cluster as a computing resource to the workspace.
You have created a DataWorks workspace. The RAM user for this operation must be a member of the workspace and have the Workspace Administrator role.
You have bound a resource group to the workspace and ensured network connectivity.
If you use a Serverless resource group, ensure that the Serverless resource group can connect to your AnalyticDB for MySQL (V3.0) cluster.
If you use a legacy exclusive resource group, ensure that the exclusive resource group for scheduling can connect to your AnalyticDB for MySQL (V3.0) cluster.
For a cluster in the current Alibaba Cloud account, bind the resource group to the same Virtual Private Cloud (VPC) as the AnalyticDB for MySQL (V3.0) cluster and add the IP addresses of the resource group to the cluster's whitelist. For a cluster in another Alibaba Cloud account, follow Connect to a cross-account data source to configure VPC connectivity, a custom route for the resource group, and the cluster whitelist.
Limitations
Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).
Permissions:
Operator
Required permissions
Alibaba Cloud account
No additional permissions are required.
RAM user/RAM role
Only workspace members with the O&M or Workspace Administrator role, or members with the
AliyunDataWorksFullAccesspermission, can create computing resources. For more information, see Grant the Workspace Administrator role to a user.
New Data Studio: Bind an AnalyticDB for MySQL (V3.0) resource
Bind an AnalyticDB for MySQL (V3.0) computing resource to a workspace that uses Use Data Studio (New Version).
To bind an AnalyticDB for MySQL (V3.0) cluster that belongs to another Alibaba Cloud account, first configure cross-account authorization in the account that owns the cluster. Create a RAM role, set the trusted entity to the Alibaba Cloud account that owns the DataWorks workspace, set Service in the trust policy to <Alibaba Cloud account ID of the DataWorks workspace>@engine.dataworks.aliyuncs.com, and attach the AliyunADBReadOnlyAccessor AliyunADBFullAccess system policy to the role as you need.
Follow the principle of least privilege. Do not grant the RAM role permissions beyond those required to query AnalyticDB for MySQL (V3.0) instances.
Go to the computing resources page
Log on to the DataWorks console. After you switch to the target region, click in the left-side navigation pane. From the drop-down list that appears, select the desired workspace and click Go to Management Center.
In the left-side navigation pane, click Computing Resources.
Bind an AnalyticDB for MySQL (V3.0) resource
On the computing resources page, configure and bind an AnalyticDB for MySQL (V3.0) computing resource.
Select the type of computing resource to bind.
Click Associate Computing Resources to go to the Associate Computing Resources page.
On the Associate Computing Resources page, select AnalyticDB for MySQL (V3.0) as the computing resource type to go to the Bind AnalyticDB for MySQL (V3.0) Computing Resource configuration page.
Configure the AnalyticDB for MySQL (V3.0) computing resource.
On the Bind AnalyticDB for MySQL (V3.0) Computing Resource configuration page, set the parameters as described in the following table.
Parameter
Description
Configuration mode
Only Alibaba Cloud Instance Mode is supported.
Alibaba Cloud account
Select Current Alibaba Cloud Account or Another Alibaba Cloud Account.
If you select Another Alibaba Cloud Account, enter the UID of Another Alibaba Cloud Account that owns the cluster and the RAM Role Name created in that account.
Instance
Select the AnalyticDB for MySQL (V3.0) cluster in the selected account and region. If you select Current Alibaba Cloud Account, you can also click Create in the drop-down list to create an AnalyticDB for MySQL (V3.0) cluster.
Database name
Enter the name of a database that has been created in the AnalyticDB for MySQL (V3.0) cluster.
Username and password
Enter the username and password for an account that has permission to access the AnalyticDB for MySQL (V3.0) cluster. If you do not have an account, you can create one.
Computing resource instance name
Specify a custom name for the computing resource. At runtime, you can select the computing resource on which to run a task based on this name.
Test the connectivity.
In the connection configuration section, select the resource group that DataWorks uses to run AnalyticDB for MySQL (V3.0) tasks, and then click Test Connectivity. Verify that the resource group can access the AnalyticDB for MySQL (V3.0) cluster. For a cluster in another Alibaba Cloud account, first follow Connect to a cross-account data source to configure VPC connectivity, a custom route for the resource group, and the cluster whitelist.
NoteIf the connectivity test fails, use the Network Connectivity Diagnostic Tool and check the cross-account VPC connection, custom route for the resource group, and AnalyticDB for MySQL (V3.0) cluster whitelist.
Click Confirm to complete the configuration.
NoteWhen you bind an AnalyticDB for MySQL (V3.0) computing resource, the system automatically creates a data source of the same name in the Data Sources section of the workspace.
Legacy Data Studio: Bind an AnalyticDB for MySQL (V3.0) resource
Bind an AnalyticDB for MySQL (V3.0) computing resource to a workspace that does not use Use Data Studio (New Version).
Go to the computing resources page
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.
In the left-side navigation pane, click the
icon to open the Computing Resources page.
Bind an AnalyticDB for MySQL (V3.0) resource
On the computing resources page, configure and bind an AnalyticDB for MySQL (V3.0) computing resource.
Select the type of computing resource to bind.
Click Create Computing Resource to open the Create Computing Resource page.
On the Create Computing Resource page, select AnalyticDB for MySQL (V3.0) as the computing resource type, and the Create Computing Resource configuration page appears.
Configure the AnalyticDB for MySQL (V3.0) computing resource.
On the Create Computing Resource configuration page, set the parameters as described in the following table.
Parameter
Description
Data source name
Specify a custom name for the computing resource. At runtime, you can select the computing resource on which to run a task based on this name.
Configuration mode
Select Alibaba Cloud Instance Mode.
NoteResources added in Connection String Mode cannot be bound to the workspace; they can only be used to create a data source.
Alibaba Cloud account
You can select Current Alibaba Cloud Account or Another Alibaba Cloud Account.
NoteIf you select Another Alibaba Cloud Account, specify the parameters for the account as prompted.
Region
The region where your workspace is located.
Instance
Select the AnalyticDB for MySQL (V3.0) cluster in the current region that you want to bind.
Database name
Enter the name of a database that has been created in the AnalyticDB for MySQL (V3.0) cluster.
Username and password
Enter the username and password for an account that has permission to access the AnalyticDB for MySQL (V3.0) cluster. If you do not have an account, you can create one.
Test the connectivity.
In the connection configuration section, select the resource group that DataWorks uses to run AnalyticDB for MySQL (V3.0) tasks, and then click Test Connectivity to ensure that the resource group can access your AnalyticDB for MySQL (V3.0) cluster. For more information, see Overview of network connectivity solutions.
Click Create and Associate Computing Resource with DataStudio to complete the configuration.
NoteWhen you bind an AnalyticDB for MySQL (V3.0) computing resource, the system automatically creates a data source of the same name in the Data Sources section of the workspace.
Appendix: Connection String Mode
You cannot bind a computing resource in User-created Data Store with Public IP Addresses, as this mode is only for creating a data source. To configure a data source in User-created Data Store with Public IP Addresses, set the following parameters.
Parameter | Description |
JDBC URL | Format: jdbc:mysql://ServerIP:Port/Database. Note
|
Username and password | Enter the username and password for an account that has permission to access the AnalyticDB for MySQL (V3.0) cluster. If you do not have an account, you can create one. |
Next steps
New Data Studio: After you configure the AnalyticDB for MySQL (V3.0) computing resource, you can use an offline sync node for data synchronization and an ADB for MySQL node for data development.
Legacy Data Studio: After you configure the AnalyticDB for MySQL (V3.0) computing resource, you can use a node for data synchronization and an AnalyticDB for MySQL node for data development.