[FAQ] DM 同步不支持 DDL 如何处理

【问题澄清】

  • 上游 mysql 执行 CREATE TABLEat(\ idint(11) DEFAULT NULL\ ) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
  • check table 报错:
......
      {
                                "id": 6,
                                "name": "table structure compatibility check",
                                "desc": "check compatibility of table structure",
                                "state": "fail",
                                "errorMsg": "********** table `test2`.`at` **********\
statement: CREATE TABLE `at` (\
  `id` int(11) DEFAULT NULL\
) ENGINE=InnoDB DEFAULT CHARSET=gb2312\
---------- error messages ----------\
information: [parser:1115]Unknown character set: 'gb2312'\
\
",
                                "instruction": "",
                                "extra": "address of db instance - 172.16.5.169:3306"
                        },
......

【解决办法】

修改上游 mysql 数据库中问题表,表结构:

CREATE TABLE at ( id int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_bin ;

【经典案例】