All Products
Search
Document Center

Dataphin:Create an AnalyticDB for MySQL 2.0 data source

Last Updated:Jun 23, 2026

Create an AnalyticDB for MySQL 2.0 data source to write data from Dataphin to AnalyticDB for MySQL 2.0.

Background information

AnalyticDB for MySQL is Alibaba Cloud's cloud-native data warehouse built on a data lakehouse architecture that provides real-time data warehousing capabilities. It is highly compatible with MySQL and supports millisecond-level updates and sub-second queries. Before connecting AnalyticDB for MySQL to Dataphin for data development, you must create a corresponding data source. For more information, see AnalyticDB for MySQL-What is AnalyticDB for MySQL.

Permission requirements

Only users with the Create Data Source permission in a custom global role, or system roles such as super administrator, data source administrator, domain architect, and project administrator, can create data sources.

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose Management Center > Datasource Management.

  2. On the Datasource page, click +Create Data Source.

  3. On the Create Data Source page, select AnalyticDB for MySQL 2.0 in the Relational Database section.

    If you have recently used AnalyticDB for MySQL 2.0, you can also select it from the Recently Used section. You can also enter keywords related to AnalyticDB for MySQL 2.0 in the search box to quickly find it.

  4. On the Create AnalyticDB For MySQL 2.0 Data Source page, configure the connection parameters.

    1. Configure the basic information of the data source.

      Parameter

      Description

      Datasource Name

      The name must meet the following requirements:

      • It can contain only Chinese characters, letters, digits, underscores (_), and hyphens (-).

      • It cannot exceed 64 characters in length.

      Datasource Code

      After you configure the data source code, you can reference tables in the data source in Flink_SQL tasks by using the format data source code.table name or data source code.schema.table name. If you need to automatically access the data source in the corresponding environment based on the current environment, use the variable format ${data source code}.table or ${data source code}.schema.table. For more information, see Dataphin data source table development method.

      Important
      • The data source code cannot be modified after it is configured.

      • You can preview data on the object details page in the asset directory and asset checklist only after the data source code is configured.

      • In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, SelectDB, and GaussDB data warehouse service (DWS) data sources are currently supported.

      Data Source Description

      A brief description of the data source. It cannot exceed 128 characters.

      Time Zone

      The time zone is used to process time format data in integration tasks. The default time zone is Asia/Shanghai. Click Modify to select a target time zone from the following options:

      • GMT: GMT-12:00, GMT-11:00, GMT-10:00, GMT-09:30, GMT-09:00, GMT-08:00, GMT-07:00, GMT-06:00, GMT-05:00, GMT-04:00, GMT-03:00, GMT-03:00, GMT-02:30, GMT-02:00, GMT-01:00, GMT+00:00, GMT+01:00, GMT+02:00, GMT+03:00, GMT+03:30, GMT+04:00, GMT+04:30, GMT+05:00, GMT+05:30, GMT+05:45, GMT+06:00, GMT+06:30, GMT+07:00, GMT+08:00, GMT+08:45, GMT+09:00, GMT+09:30, GMT+10:00, GMT+10:30, GMT+11:00, GMT+12:00, GMT+12:45, GMT+13:00, GMT+14:00.

      • Daylight Saving Time: Africa/Cairo, America/Chicago, America/Denver, America/Los_Angeles, America/New_York, America/Sao_Paulo, Asia/Bangkok, Asia/Dubai, Asia/Kolkata, Asia/Shanghai, Asia/Tokyo, Atlantic/Azores, Australia/Sydney, Europe/Berlin, Europe/London, Europe/Moscow, Europe/Paris, Pacific/Auckland, Pacific/Honolulu.

      Data Source Configuration

      Select the data source to configure:

      • If your business data source distinguishes between production and development data sources, select Production + Development Data Source.

      • If your business data source does not distinguish between production and development data sources, select Production Data Source.

      Tag

      Tags let you categorize data sources. For information on how to create tags, see Manage data source tags.

    2. Configure the connection parameters between the data source and Dataphin.

      If you select Production + Development data source, configure the connection information for both environments. If you select Production data source, configure the connection information for the production environment only.

      Note

      We recommend configuring separate data sources for production and development to achieve environment isolation, reducing the impact of development activities on production. However, Dataphin also supports configuring them as the same data source with identical parameter values.

      Parameter

      Description

      JDBC URL

      The format of the connection address is jdbc:mysql//host:port/dbname.

      Username, Password

      The username and password of the database.

    3. Configure advanced settings for the data source.

      Parameter

      Description

      connectTimeout

      The connection timeout duration in milliseconds. Default: 900000 (15 minutes).

      Note
      • If you have included a connectTimeout configuration in the JDBC URL, the connectTimeout will be the timeout period configured in the JDBC URL.

      • For data sources created before Dataphin V3.11, the default connectTimeout is -1, which means no timeout limit.

      socketTimeout

      The socket timeout duration in milliseconds. Default: 1800000 (30 minutes).

      Note
      • If you have included a socketTimeout configuration in the JDBC URL, the socketTimeout will be the timeout period configured in the JDBC URL.

      • For data sources created before Dataphin V3.11, the default socketTimeout is -1, which means no timeout limit.

  5. Select a Default Resource Group, which is used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.

  6. Perform a Test Connection or directly click OK to save and complete the creation of the AnalyticDB for MySQL 2.0 data source.

    Click Test Connection to verify that the data source can connect to Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters. The data source can still be created even if all clusters fail the connection test.