文档首页/
    
      
      数据复制服务 DRS/
      
      
        
        
        故障排除/
        
        
        失败案例/
        
        
        MySQL->MySQL实时迁移和同步/
        
      
      全量阶段失败报错,关键词“Failed to add the foreign key constraint '***' to system tables”
    
  
  
    
        更新时间:2024-11-29 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
全量阶段失败报错,关键词“Failed to add the foreign key constraint '***' to system tables”
场景描述
全量迁移或同步期间,日志界面提示信息:Failed to add the foreign key constraint '***' to system tables。
可能原因
全量阶段期间,目标库存在同名外键约束。
解决方案
- 删除或重命名目标库同名外键约束,可执行以下SQL查询。
    
select * from information_schema.REFERENTIAL_CONSTRAINTS where CONSTRAINT_NAME = "外键名";
 - 修改完成后,在任务列表中,单击任务对应操作列的“续传”,重新提交任务。
 
   父主题: MySQL->MySQL实时迁移和同步