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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南