AWS DMS에서 MySQLRDS→사전 제작된 MySQL의 지속적인 복제 실행
하고 싶은 일
AWS DMS를 사용하여 MySQLRDS→미리 만들어진 MySQL의 지속적인 응용 프로그램 열기 테스트
MySQL 버전: 5.7
다음 공식 문서를 참조하는 동시에MysQLRDS의 설정을 하나하나 확인합니다
Amazon이 관리하는 MySQL 호환 데이터베이스의 AWS DMS 소스로 사용
자동 백업은 반드시 유효해야 한다

binlog_포맷이 ROW여야 함
원래 my였는데cnf에 작성된 설정을 통해 RDS에서 매개변수 그룹을 통해 확인

바이너리 로그 유지 기간 변경
기본 설정에서 RDS와 Aurora는 바이너리 로그를 즉시 제거하기 위해 유지 시간을 연장해야 합니다
binlog의 유지 기간을 24h로 설정합니다
変更前
MySQL [(none)]> call mysql.rds_show_configuration;
+------------------------+-------+------------------------------------------------------------------------------------------------------+
| name | value | description |
+------------------------+-------+------------------------------------------------------------------------------------------------------+
| binlog retention hours | NULL | binlog retention hours specifies the duration in hours before binary logs are automatically deleted. |
+------------------------+-------+------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
変更
call mysql.rds_set_configuration('binlog retention hours', 24);
変更後確認
MySQL [(none)]> call mysql.rds_show_configuration;
+------------------------+-------+------------------------------------------------------------------------------------------------------+
| name | value | description |
+------------------------+-------+------------------------------------------------------------------------------------------------------+
| binlog retention hours | 24 | binlog retention hours specifies the duration in hours before binary logs are automatically deleted. |
+------------------------+-------+------------------------------------------------------------------------------------------------------+
binlog_Checksum을 NONE으로 만들어야 해요.

매개변수 그룹 변경 내용
binlog_format 및 binlogcheck ksum이 지정된 값이 아니므로 RDS 매개변수 그룹 변경

dynamic으로 변경되어 RDS 재부팅이 수행되지 않은 상태에서 수행
수정 확인

DMS 실행
전송 소스에 테스트용 DB 구축
MySQL [(none)]> create database dms_test;
MySQL [(none)]> use dms_test;
Database changed
MySQL [dms_test]> create table testtable ( id INT , name VARCHAR(5) );
Query OK, 0 rows affected (0.05 sec)
MySQL [dms_test]> show tables;
+--------------------+
| Tables_in_dms_test |
+--------------------+
| testtable |
+--------------------+
1 row in set (0.00 sec)
MySQL [dms_test]> insert into testtable values ( 1 , "taro");
Query OK, 1 row affected (0.01 sec)
MySQL [dms_test]>
MySQL [dms_test]> select * from testtable;
+------+------+
| id | name |
+------+------+
| 1 | taro |
+------+------+
작업 생성 - 실행
다음 설정을 통해 작업 만들기
작업 이름: dms-Cdc-test
변환 유형: "기존 데이터 전송, 지속적인 변경 복사"
Logging의 유효성: 검사(CloudWatch 로그에서 작업 실행 로그를 확인하기 위함)
표 매핑:dms첫 번째 모드 선택
임무를 수행하다

상태는 준비 완료입니다.
이 시점에서 Training Professional DB로 전송되지 않음
시작/재시작 버튼을 클릭하면 작업이 시작됩니다.

이동 목적지 DB에 대한 데이터 불러오기가 완료되면 클라우드워치 로그에 다음과 같이 출력합니다. 이동 완료
Load finished for table 'dms_test','testtable'...
작업 상태는 로드 완료, 복제 진행 중입니다.
대상 DB의 데이터를 확인합니다.dms_테스트 데이터베이스 이전 완료
mysql> show databases; mysql> select * from dms_test.testtable;
+--------------------+ +------+------+
| Database | | id | name |
+--------------------+ +------+------+
| information_schema | | 1 | taro |
| awsdms_control | +------+------+
| dms_test |
| mysql |
| performance_schema |
| sys |
+--------------------+
8 rows in set (0.00 sec)
소스 DB로 이동MySQL [dms_test]> insert into testtable values ( 2,"ichi");
Query OK, 1 row affected, 1 warning (0.01 sec)
MySQL [dms_test]> select * from testtable;
+------+-------+
| id | name |
+------+-------+
| 1 | taro |
| 2 | ichi |
+------+-------+
2 rows in set (0.00 sec)
이동 대상 DB의 반영 확인mysql> select * from testtable;
+------+-------+
| id | name |
+------+-------+
| 1 | taro |
| 2 | ichi |
+------+-------+
2 rows in set (0.00 sec)
참고 자료
바이너리 로그 형식 정보
Reference
이 문제에 관하여(AWS DMS에서 MySQLRDS→사전 제작된 MySQL의 지속적인 복제 실행), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/forestkinoko/items/963609b776a61da46620텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)