To utilize the PolarDB-X datasource in DataV-Board, you must first add it as a datasource. This topic guides you through the process of adding a PolarDB-X datasource.
Prerequisites
Before adding the database, ensure you have activated the corresponding database service by following the instructions in Create a PolarDB-X instance.
DataV-Board supports both PolarDB-X 1.0 and PolarDB-X 2.0 datasources. This tutorial focuses on adding a PolarDB-X 2.0 instance.
Limits
Supports only Enterprise Edition or higher.
Add a datasource through the intranet
Access the DataV console.
Navigate to the Workbench page and click .
Choose Polardb-x from the Type dropdown menu.
Select Intranet and specify the region where your PolarDB-X instance is located.
Enter the database details, choosing the network type for the intranet database, which includes both Virtual Private Cloud (VPC) and Classic Network options.
Virtual private cloud
Activate the VPC toggle to switch to VPC mode.
Provide the necessary database configuration details.
Parameter
Description
Name
Custom datasource name.
VPC ID
ID of the VPC-connected instance, which is the VPC where your PolarDB-X instance is located. You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and view the VPC ID on the Basic Information page.
Instance ID
Optional VPC database instance ID, VPC network connection address, or VPC network IP address. Use the DescribeDBInstanceAttribute interface through OpenAPI to query instance property information and obtain instance details including VPCInstanceId.
Domain Name
The VPC address used to access the PolarDB-X database instance. You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and view the intranet address on the page.
Port
The port number set by the database.
Database login information
Enter the login user and password for the PolarDB-X instance you need to access, automatically obtain the database list, or manually enter the database name.
You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and select Configuration And Management under the left-side navigation pane, then choose Database Management and Account Management to view the database login information.
Classic network
Deactivate the VPC toggle to switch to Classic Network mode.
Provide the necessary database configuration details.
Parameter
Description
Name
Custom datasource name.
Domain Name
The classic network address used to access the PolarDB-X database instance.
Port
The port number set by the database.
Database login information
Enter the login user and password for the PolarDB-X instance you need to access, automatically obtain the database list, or manually enter the database name.
You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and select Configuration And Management under the left-side navigation pane, then choose Database Management and Account Management to view the database login information.
Once the database details are entered, click OK. The system will test the connection automatically. If successful, the new datasource will be listed.
ImportantShould the error message Access VPC instance fail appear during the connection test, try appending a -1 suffix to the Instance ID and test again.
Add a datasource through the internet
Access the DataV console.
On the Workbench page, click .
Select Polardb-x from the Type dropdown menu.
Choose Internet from the list.
Enter the database configuration details.
Parameter
Description
Name
Custom datasource name.
Domain Name
The internet address used to access the PolarDB-X database instance. You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and view the internet address on the page.
Port
The port number set by the database.
Database login information
Enter the login user and password for the PolarDB-X instance you need to access, automatically obtain the database list, or manually enter the database name.
You can log on to the PolarDB-X console, select the PolarDB-X 2.0 tab, click the instance name, and select Configuration And Management under the left-side navigation pane, then choose Database Management and Account Management to view the database login information.
After entering the database information, click OK. The system will automatically test the connection. If successful, the new datasource will be listed.
ImportantIf the error message Access VPC instance fail appears during the connection test, try adding a -1 suffix to the Instance ID and test again.
What to do next
Following datasource creation, you may:
Utilize the datasource by entering the editing page of your target project, adding widgets, and connecting to the datasource.
Manage the data source by performing necessary operations, including editing or deleting it. For more information, see Manage the Data Source.
References
Should you have any questions or suggestions regarding the use of DataV-Board, please contact us without delay.
For additional details on data sources, refer to Datasource.