All Products
Search
Document Center

Data Transmission Service:Value of server_id in the source database

Last Updated:May 17, 2023

Before Data Transmission Service (DTS) starts incremental data migration between MySQL databases, DTS prechecks the value of the server_id parameter in the source database. This topic describes how to configure the server_id parameter to pass the precheck.

Solution

  1. Log on to the server on which the source self-managed MySQL database is deployed.

  2. Execute the following SQL statement to view the value of server_id:

    show variables like '%server_id%';
  3. Check whether the value of server_id is an integer greater than 1. If the value of server_id is not greater than 1, execute the following SQL statement to modify the value of sever_id:

    set global server_id=<id>;
    Important
    • The value of server_id of the self-managed database must be an integer greater than 1 and must be unique among all databases.

    • If the self-managed database is deployed in primary/secondary mode, make sure that the primary/secondary replication is not affected by the modification of the value of server_id.

    • After the SQL statement is executed, modify the value of server_id in the configuration file accordingly. Otherwise, the modified value becomes invalid after you restart the database.

    Example:

    set global server_id=2;
  4. Log on to the DTS console and perform a precheck again.