Skip to main content

Create data sources

Add self-managed or cloud-hosted data sources to NineData so they can be used by Database DevOps, backup and restore, data replication, database comparison, and other supported features.

Before you begin

Prepare the data source address, port, authentication credentials, network access method, and any required allowlist or gateway settings before you create the data source.

Supported data sources

  • Supported cloud vendors: Alibaba Cloud, Tencent Cloud, Huawei Cloud, AWS, Mobile Cloud, Baidu Cloud, Google Cloud, and Azure.

  • Supported data source types:

    CategoryData Source
    Database
    • Relational Databases: MySQL, SQL Server, PostgreSQL, Oracle, OceanBase for Oracle, OceanBase for MySQL, Db2, Dameng, KingbaseES for PostgreSQL, KingbaseES for Oracle, Klustron, openGauss, Sybase, TiDB, GreatSQL, GBase, Massive Database, GoldenDB
    • NoSQL Databases: MongoDB, Redis, Milvus
    • Data Warehouses: ClickHouse, Doris, SelectDB, Greenplum, StarRocks, SingleStore, Hive, MaxCompute
    • Other Data Sources: Elasticsearch, Kafka
    Alibaba CloudRDS MySQL, PolarDB MySQL, AnalyticDB MySQL, RDS SQL Server, RDS PostgreSQL, AnalyticDB PostgreSQL, Cloud Database MongoDB, Cloud Database Redis, Cloud Database Clickhouse, Search and Analysis Service Elasticsearch, Cloud Message Queue Kafka, AnalyticDB PostgreSQL, DataHub, MaxCompute, Lindorm
    Tencent cloudCloud Database MySQL, TDSQL-C MySQL, Cloud Database SQL Server, Cloud Database PostgreSQL, Cloud Database MongoDB, Cloud Database Redis, Elasticsearch Service, Message Queue CKafka, TDSQL MySQL, TDSQL PostgreSQL
    Huawei CloudCloud Database RDS for MySQL, Cloud Database GaussDB for MySQL, Cloud Database RDS for SQL Server, Cloud Database RDS for PostgreSQL, Document Database Service DDS, Cloud Database GaussDB for Redis, Cloud Search Service CSS, Distributed Message Service Kafka, Cloud Database Warehouse (DWS), Cloud Database GaussDB
    AWSRDS MySQL, RDS PostgreSQL, RDS MariaDB, RDS SQL Server, RDS Oracle, Aurora MySQL, Aurora PostgreSQL, DocumentDB, MemoryDB for Redis, Redshift, ElastiCache (Redis Engine)
    ECloudRDS for MySQL, MongoDB, Redis
    Baidu CloudCloud Database RDS MySQL, DocDB for MongoDB, Cloud Database Redis, Cloud Native Database GaiaDB, Cloud Database GaiaDB-X, Cloud Vector Database VectorDB, PegaDB

Network and quota requirements

  • To ensure a stable connection, first select Access Region on the Create Datasource page. Then add the NineData service IP address shown below to your server allowlist. For self-managed databases in an IDC, see Appendix II. For cloud servers or managed databases, follow the cloud vendor's official documentation.

    server_ip_address

  • Make sure you have available data source quota before creating a new data source. You can check the remaining quota in the NineData console. check_quota

Create self-managed data sources

Use the following links to open the creation guide for each self-managed data source type.

Data Source TypeData Source NameHyperlink
Relational DatabasesMySQL Data SourceCreate MySQL Data Source
PostgreSQL Data SourceCreate PostgreSQL Data Source
PolarDB for Oracle Data SourceCreate PolarDB for Oracle Data Source
PolarDB for PostgreSQL Data SourceCreate PolarDB for PostgreSQL Data Source
PolarDB-X Data SourceCreate PolarDB-X Data Source
Oracle Data SourceCreate Oracle Data Source
SQL Server Data SourceCreate SQL Server Data Source
Db2 Data SourceCreate Db2 Data Source
TiDB Data SourceCreate TiDB Data Source
OceanBase MySQL Data SourceCreate OceanBase MySQL Data Source
OceanBase Oracle Data SourceCreate OceanBase Oracle Data Source
Dameng Data SourceCreate Dameng Data Source
Kingbase Data SourceCreate Kingbase Data Source
GBase Data SourceCreate GBase Data Source
openGauss Data SourceCreate openGauss Data Source
Sybase Data SourceCreate Sybase Data Source
GreatSQL Data SourceCreate GreatSQL Data Source
MariaDB Data SourceCreate MariaDB Data Source
HANA Data SourceCreate HANA Data Source
NoSQLMongoDB Data SourceCreate MongoDB Data Source
Redis Data SourceCreate Redis Data Source
AWS ElastiCache Data SourceCreate AWS ElastiCache Data Source
Milvus|Zilliz Cloud Data SourceCreate Milvus|Zilliz Cloud Data Source
Data WarehousesClickHouse Data SourceCreate ClickHouse Data Source
Doris Data SourceCreate Doris Data Source
StarRocks Data SourceCreate StarRocks Data Source
Hive Data SourceCreate Hive Data Source
MaxCompute Data SourceCreate MaxCompute Data Source
Greenplum Data SourceCreate Greenplum Data Source
SingleStore Data SourceCreate SingleStore Data Source
SelectDB Data SourceCreate SelectDB Data Source
OthersElasticsearch Data SourceCreate Elasticsearch Data Source
Kafka Data SourceCreate Kafka Data Source

Create cloud vendor data sources

  1. Log in to the NineData Console.

  2. On the left navigation pane, click Datasource > Datasource.

  3. Click Datasource tab, and click Create Datasource on the page. In the popup window for selecting the data source type, choose (Cloud Vendor Name) > (the type of data source to be added), and configure the parameters based on the table below on the Create Datasource page.
    tip

    If you make a mistake during the operation, you can click the arrow_down icon at the top of the Create Datasource page to make a new selection.

Supported instance types:

  • RDS for MySQL
  • PolarDB for MySQL
  • AnalyticDB for MySQL
  • RDS for SQL Server
  • RDS for PostgreSQL
  • ApsaraDB for MongoDB
  • ApsaraDB for Redis
  • ApsaraDB for ClickHouse
  • Elasticsearch
  • ApsaraMQ for Kafka
  • AnalyticDB for PostgreSQL
  • DataHub
  • MaxCompute
  • Self-managed Datasource

Parameter
Description
NameEnter a meaningful data source name so it is easy to search and manage later.
ConnectionSelect how NineData connects to the data source.
  • Private Network: Connect through the cloud vendor's private network address. Use this option when you need private-network access or higher transmission throughput. Connect the private network address to NineData first. For instructions, see Add Private Network Address, and then select the connected PrivateLink.
  • IP Address: Connect through the public network address. Enter the instance public endpoint in Host.
  • Gateway (self-managed databases only): Connect through a NineData gateway. First connect the host where the data source is located. For instructions, see Add Gateway. Then select the connected Gateway and enter Host. The address can be localhost or an internal IP address. Set Host based on the selected Connection.
  • SSH Tunnel: Connect through an SSH tunnel. Provide SSH Host, SSH Authentication Method, SSH Username, and other SSH settings. For setup steps, see:
Access MethodSelect how to locate the Alibaba Cloud instance: by Instance ID or by Host.
  • Instance ID: Access the instance by ECS or cloud database instance ID. Select Access Credentials, Access Region, and Instance ID. Configure Access Credentials in advance. For instructions, see Configure Cloud Vendor Access Credentials.
  • Host: Access the instance by connection address. The value of Host depends on Connection.
Authentication DBRequired when the data source is MongoDB, specifying the authentication database for the current user.
DB AccountThe username of the data source.
DB PasswordThe password of the data source.
Access RegionOnly required when accessing the data source through the connection address. Select the region closest to your data source location to effectively reduce network latency.
EnvironmentSelect the environment that matches the business purpose of this data source. NineData provides PROD and DEV by default, and you can create custom environments.
Note: In organization mode, database environments can also be used for permission policy management. For example, the default Prod Admin role can access only data sources in PROD. For more information, see Manage Roles.
EncryptionChoose whether to connect with SSL encryption. If the data source requires SSL, enable this switch or the connection fails.
Use the switch on the right to enable or disable encrypted transmission. For some data source types, click > to the left of Encryption to expand advanced settings.
Note: Supported SSL options vary by data source type. See the console for the available options.
  1. After completing the configuration, click the arrow next to Create Datasource and select Connection Test to test the connection. If Connection Successfully appears, click Create Datasource to add the data source. If the test fails, review the connection settings and test again.

Result

After the connection test succeeds and the data source is created, the data source appears in the data source list and can be used by NineData features that support that data source type.

Appendix 1: Create an environment

NineData provides PROD and DEV by default. You can also create custom environments for your organization's business, permission, or workflow needs.

  1. Log in to the NineData Console.

  2. Go to Datasource > Datasource.

  3. Click the Environment tab. The page lists all environments under the current user in personal mode or organization in organization mode. You can Edit or Delete custom environments.

  4. Click Create Envir..

  5. Complete the configuration using the table, and then click OK.

    ParameterDescription
    NameEnter an environment name with 1 to 16 characters. Use a meaningful name so the environment is easy to identify.
    Label ColorChoose the color of the environment label displayed in the console.

Appendix 2: Add NineData service IP addresses to a database allowlist

When you add a data source located in On-Premise/Other Cloud, add the NineData service IP addresses to the database allowlist so NineData can connect to the database.

This section uses MySQL 8.0 as an example.

  • New account: Sign in to the database as the root account, create an account for NineData, and grant the required permissions.
  CREATE USER '<account name>'@'<NineData IP address>' IDENTIFIED BY '<access password>';
GRANT <privilege name> ON <database name>.* TO '<account name>'@'<NineData IP address>';
  • Existing account: Sign in to the database as the root account, add the NineData service IP address to the account allowlist, and grant the required permissions.
GRANT <privilege name> ON <database name>.* TO '<account name>'@'<NineData IP address>' IDENTIFIED BY '<access password>';
tip

When you add the MySQL data source in NineData, use the account and password that allow connections from the NineData service IP address.

Appendix 3: Add multi-active tags to data sources

If a data source is used in multi-node replication tasks, which replicate data among three or more data sources, each participating data source must have a globally unique multi-active tag. The tag helps prevent circular replication.

  1. Log in to the NineData Console.

  2. In the left navigation pane, click Datasource > Datasource.

  3. Click the target data source ID to open the Data Source Details page.

    1. In the data source details area (including data source name, ID, creator, creation time, etc.), click Show Details.
  4. Find Multi-Active Tag, and click the edit icon on the right.

  5. Enter the Multi-Active Tag, and click OK.

    tip
    • Multi-active tag can contain 1~64 characters.
    • The multi-active tag must be globally unique and cannot be duplicated with other multi-active tag.

Appendix 4: Create Tags

Tags are used for custom grouping in the slow query analysis feature of the Database DevOps module. By configuring tags for specific data sources, you can flexibly group and display slow queries on the dashboard based on business logic, departments, or other requirements. This helps you more precisely identify and address performance bottlenecks.

  1. Log in to the NineData Console.

  2. Go to Datasource > Datasource.

  3. Click the Tag tab, and then click Create Tag.

  4. In the Create Tag dialog, enter the Tag Name and click OK.

    tip
    • The tag name must be globally unique.
    • After creating the tag, bind it to the target data source in the slow query analysis module. For more information, see Slow Query Analysis.

Troubleshooting

IssuePossible CauseSolution
Error when adding a data source: http connections are not allowed from xxx.xxx.xxx.xxx:xxxxx.The NineData service IP address is not in your server allowlist.Before adding a data source, add the NineData service address to the data source allowlist. For more information, see Network and quota requirements.