AnalyticDB for MySQL

Updated at: 2024-11-15 06:54

Property definition

  • Data source type: analyticdb_for_mysql

  • Supported configuration modes (ConnectionPropertiesMode):

    • Connection string mode (UrlMode)

    • Instance mode (InstanceMode)

Current-account instance mode

Parameter

Type

Example

Required

Description

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the AnalyticDB for MySQL instance belongs.

instanceId

String

am-wz90k6goz2i63d8m1

Yes

The ID of the AnalyticDB for MySQL instance.

database

String

database_demo

Yes

The name of the AnalyticDB for MySQL database.

username

String

xxxxx

Yes

The username used to access the AnalyticDB for MySQL database.

password

String

xxxxx

Yes

The password used to access the AnalyticDB for MySQL database.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Cross-account instance mode

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the AnalyticDB for MySQL instance belongs.

instanceId

String

am-wz90k6goz2i63d8m1

Yes

The ID of the AnalyticDB for MySQL instance.

database

String

database_demo

Yes

The name of the AnalyticDB for MySQL database.

username

String

xxxxx

Yes

The username used to access the AnalyticDB for MySQL database.

password

String

xxxxx

Yes

The password used to access the AnalyticDB for MySQL database.

crossAccountOwnerId

String

1577495724967111

Yes

The ID of another Alibaba Cloud account.

crossAccountRoleName

String

dw-ds2.0-role

Yes

The name of the RAM role assumed by another Alibaba Cloud account.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Connection string mode

Parameter

Type

Example

Required

Description

Parameter

Type

Example

Required

Description

database

String

database_demo

Yes

The name of the AnalyticDB for MySQL database.

username

String

xxxxx

Yes

The username used to access the AnalyticDB for MySQL database.

password

String

xxxxx

Yes

The password used to access the AnalyticDB for MySQL database.

address

JSON Array

[
  {
    "host": "127.0.0.1",
    "port": 3306
  }
]

Yes

The address, which is configured in the JSON array format but contains only a single pair of host and port.

properties

JSONObject

No

The advanced parameters for a Java Database Connectivity (JDBC) connection.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Configuration examples

Current-account instance mode

{
    "database": "database",
    "password": "***",
    "instanceId": "am-uf6z88b2xi4niv71p",
    "regionId": "cn-shanghai",
    "envType": "Dev",
    "username": "username"
}

Cross-account instance mode

{
    "database": "database",
    "password": "***",
    "instanceId": "am-uf6z88b2xi4niv71p",
    "regionId": "cn-shanghai",
    "envType": "Dev",
    "username": "username",
    "crossAccountOwnerId": "1853195337009715",
    "crossAccountRoleName": "dw-ds2.0-role"
}

Connection string mode

{
    "address": [
        {
            "host": "127.0.0.1",
            "port": 5432
        }
    ],
    "database": "db",
    "properties": {
        "connectTimeout": "2000"
    },
    "username": "aliyun",
    "password": "xxx",
    "envType": "Dev"
}
  • On this page (1, T)
  • Property definition
  • Current-account instance mode
  • Cross-account instance mode
  • Connection string mode
  • Configuration examples
  • Current-account instance mode
  • Cross-account instance mode
  • Connection string mode
Feedback