- 解压缩源数据库表
AWS DMS不支持压缩后的源数据库表。因此,如果源数据库表被压缩,可以先将其解压缩,然后尝试重新启动复制任务。
- 在复制任务设置中指定解压缩选项
如果源数据库表无法解压缩,可以在AWS DMS复制任务设置中指定解压缩选项。在源端点设置中,选择“Advanced”选项卡,在“Extra connection attributes”字段中输入“initstmt=SET @@SESSION.sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';”以避免MySQL错误。
示例代码:
{
"TargetEndpoint":{
"EndpointIdentifier":"",
"EndpointType":"target",
"EngineName":"aurora",
"Username":"",
"Password":"",
"ServerName":"",
"Port":3306,
"DatabaseName":"",
"ExtraConnectionAttributes":"initstmt=SET @@SESSION.sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';"
},
"ReplicationInstanceArn":"",
"SourceEndpoint":{
"EndpointIdentifier":"",
"EndpointType":"source",
"EngineName":"mysql",
"Username":"",
"Password":"",
"ServerName":"",
"Port":3306,
"DatabaseName":"",
"ExtraConnectionAttributes":"initstmt=SET @@SESSION.sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';"
},
"MigrationType":"full-load",
"ReplicationTaskIdentifier":""
}