DBS allows you to add multiple data sources of the same type, which facilitates management and backup. This topic describes how to add multiple data sources at a time.

Usage notes

  • The batch import feature is available only for self-managed MySQL databases that are deployed over the Internet.
  • You are not charged when you add a data source. You are charged if you enable backup for the added data source. For more information about how to enable backup, see Back up databases.


  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Data Source. On the Data Source page, select a region in the upper-left corner.
  3. Select Batch import from the Data source category drop-down list.
  4. In the Batch data source field, enter multiple data sources.
    Add multiple data sources

    Enter a data source in the following format: $instanceName,$host,$port,region,MySQL,$account,$password. Press the Enter key to move to a new line.


    The following table describes the parameters.

    Parameter Description
    instanceName The name of the data source.
    Note We recommend that you set a descriptive name that makes it easy to identify.
    host The IP address that is used to connect to the specified database.
    port The port number that is used to connect to the specified database.
    region The region in which to create the backup schedule.
    Note You must select the region that you selected in Step 2. If you set this parameter to cn-hangzhou, the backup schedule of the database is created in the China (Hangzhou) region.
    MySQL The database engine. Set this parameter to MySQL.
    account The database account.
    • The account is used to log on to the database that is used as the data source. The account must have the required permissions. For more information, see Database permissions.
    • After you add a data source and configure a database account and password, you can change the database account and password in the DBS console. For more information, see Configure the account and password for a data source.
    password The password for the account.
  5. Click Test Connection.
    • If the configured database account and password are valid, a message appears, which indicates that the connection is successful.
    • If the configured database account and password are invalid, a message appears, indicating that the connection fails. You can click Check to view the cause of failure.
  6. Click OK.
    Add multiple data sources

    You can view the added data sources on the Data Source page.