Help Center> Data Replication Service> Troubleshooting> Solutions to Failed Check Items> Database Parameters> Checking Whether the Source Database server_id Meets the Incremental Migration Requirements
Updated on 2024-05-09 GMT+08:00

Checking Whether the Source Database server_id Meets the Incremental Migration Requirements

During an incremental MySQL migration, the source database server_id must meet the following requirements:

  • If the source database version is MySQL 5.6 or earlier, the value of server_id ranges from 2 to 4294967296.
  • If the source database version is MySQL 5.7 or later, the value of server_id ranges from 1 to 4294967296.

Failure Cause

The server_id value of the source database does not meet requirements.

Handling Suggestion

  1. Log in to the server where the MySQL source database is located.
  2. Run the following SQL statement to check the value of server_id:

    show variables like '%server_id%';

  3. If the value of server_id does not meet requirements, run the following command to change the value of server_id:

    set global server_id=n

    The value n indicates the source database server_id. If the source database version is MySQL 5.6, the value n ranges from 2 to 4294967296. Otherwise, the value n ranges from 1 to 4294967296.

  4. After the modification, perform the pre-check again.