数据传输DTS两个rds都是5.7,为啥报这个错?MySQL的InnoDB引擎表索引字段长度的限制为767字节?【UID】:255255287662589092
【Job ID】:u12126q5b5ro000
【任务名称】:shop_sync
【所有报错信息】:
CODE:DTS-RETRY-ERR-0142
错误概述:MySQL的InnoDB引擎表索引字段长度的限制为767字节。
解决方案:对于5.6和5.7版本的RDS MySQL,您可以将目标实例innodb_large_prefix参数的值修改为ON。请查看帮助文档解决方法。
帮助文档:https://help.aliyun.com/document_detail/462133.html#DTS-RETRY-ERR-0142
详细报错信息:Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1.. Specified key was too long; max key length is 767 bytes(advice: set the parameter innodb_large_prefix to 1..
【URL】:https://dtsnew.console.aliyun.com/sync/cn-beijing
【当前时间】:2023-12-05 14:35:12
【Region】:cn-beijing
根据您提供的错误信息,问题出在MySQL的InnoDB引擎表索引字段长度的限制为767字节。对于5.6和5.7版本的RDS MySQL,您可以将目标实例innodb_large_prefix参数的值修改为ON。请查看帮助文档解决方法。
解决方案:
SET GLOBAL innodb_large_prefix=ON;
好目前结构报错是因为MySQL的InnoDB引擎表索引字段长度的限制为767字节,对于MySQL5.6、5.7版本,您可以登录RDS控制台,修改目标实例参数设置,将innodb_large_prefix值修改为ON,修改后对于Dynamic和Compressed格式的InnoDB引擎表,其支持的最大索引字段长度为3072字节,修改之后,重启一下DTS任务即可 ,此回答整理自钉群“DTS客户交流群-2”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。