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'?

asked 5 months ago269 views
1 Answer
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
SUPPORT ENGINEER
Kyle_B
answered 5 months ago
profile picture
EXPERT
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions