Help Center> Data Replication Service> Troubleshooting> Failure Cases> Real-Time Migration and Synchronization from MySQL to MySQL> Full Phase Error: Failed to add the foreign key constraint '***' to system tables
Updated on 2023-09-06 GMT+08:00

Full Phase Error: Failed to add the foreign key constraint '***' to system tables

Scenarios

During a full migration or synchronization, an error is reported, and the log information is as follows: Failed to add the foreign key constraint '***' to system tables

Possible Causes

During the full phase, the destination database has foreign key constraints with the same name.

Solution

  1. Run the following SQL statement to delete or rename the foreign key constraints with the same name in the destination database:
    select * from information_schema.REFERENTIAL_CONSTRAINTS where CONSTRAINT_NAME = "foreign_key_name";
  2. In the task list, locate the target task and click Resume in the Operation column to resume the task.