AWS DMS target endpoint extra connection attributes format

0

There is no example in documentation how to define Extra connection attributes for target endpoint in case you have more than one settings. I have to set for MySQL: SET FOREIGN_KEY_CHECKS=0 and SET time_zone='+00:00'. In DMS console they are defined as:

Initstmt=SET FOREIGN_KEY_CHECKS=0,time_zone='+00:00';

I'm not sure if that bot settings are working. I'm not sure if a Initstmt should be initstmt and what is separator: ',' or ';' or something else. Does every settings inside 'initstmt' should start with 'SET'?

已提问 6 个月前294 查看次数
1 回答
0

Hi,

It sounds like you will need to utilize "AfterConnectScript" as mentioned here. [1]

Alternatively, you can use the AfterConnectScript parameter of the --my-sql-settings command to disable foreign key checks and specify the time zone for your database.

I was able to create an endpoint with "AfterConnectScript": "SET time_zone=+00:00", and Initstmt=SET FOREIGN_KEY_CHECKS=0;

References: [1] MySQL Target: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html

AWS
支持工程师
Kyle_B
已回答 6 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则