dm 同步问题:[parser:1115]Unknown character set: ‘gbk’


“msg”: “[code=11006:class=functional:scope=internal:level=high] encountered incompatible DDL in TiDB:\n\tplease confirm your DDL statement is correct and needed.\n\tfor TiDB compatible DDL, please see the docs:\n\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\n\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\n\tif the DDL is not needed, you can use a filter rule with “*” schema-pattern to ignore it.\n\t : parse statement: [parser:1115]Unknown character set: ‘gbk’%!(EXTRA string=CREATE TABLE gaia_customer (\n customer_id varchar(255) NOT NULL COMMENT ‘编号’,\n customer_parent_id varchar(255) DEFAULT NULL COMMENT ‘父编号’,\n customer_accesskey varchar(255) DEFAULT NULL COMMENT ‘客户密钥’,\n customer_name varchar(50) CHARACTER SET gbk DEFAULT NULL COMMENT ‘客户名称’,\n customer_industry varchar(50) DEFAULT NULL COMMENT ‘行业领域’,\n customer_scale varchar(50) DEFAULT NULL COMMENT ‘企业规模’,\n customer_nature varchar(50) DEFAULT NULL COMMENT ‘企业性质’,\n customer_describe varchar(255) DEFAULT NULL COMMENT ‘企业描述’,\n customer_charge_ratio decimal(18,2) DEFAULT NULL COMMENT ‘收费比例’,\n customer_contacts_id varchar(255) DEFAULT NULL COMMENT ‘联系人编号’,\n customer_contacts varchar(50) DEFAULT NULL COMMENT ‘联系人’,\n customer_phone varchar(50) DEFAULT NULL COMMENT ‘手机号’,\n customer_email varchar(50) DEFAULT NULL COMMENT ‘邮箱’,\n customer_available_balance decimal(18,2) DEFAULT NULL COMMENT ‘可用余额’,\n customer_frozen_balance decimal(18,2) DEFAULT NULL COMMENT ‘冻结金额’,\n customer_total_chaged decimal(18,2) DEFAULT NULL COMMENT ‘客户总的充值金额’,\n customer_total_service decimal(18,2) DEFAULT NULL COMMENT ‘总服务费’,\n customer_balance_threshold decimal(18,2) DEFAULT NULL COMMENT ‘余额预警金额’,\n worker_withdraw_threshold decimal(18,2) DEFAULT NULL COMMENT ‘员工提现金额’,\n customer_sms_notify_url varchar(255) DEFAULT NULL COMMENT ‘短信通知回调接口’,\n customer_notify_url varchar(255) DEFAULT NULL COMMENT ‘客户通知回调接口’,\n customer_sms_title_template varchar(255) DEFAULT NULL COMMENT ‘客户短信标题模板’,\n customer_sms_title_content varchar(255) DEFAULT NULL COMMENT ‘客户短信内容’,\n customer_job_number varchar(50) DEFAULT NULL COMMENT ‘sales工号’,\n customer_sign_sales varchar(255) DEFAULT NULL COMMENT ‘签单sales’,\n customer_contract_time datetime DEFAULT NULL COMMENT ‘合同签定日期’,\n customer_grant_time datetime DEFAULT NULL COMMENT ‘首次发放日期’,\n customer_create_time datetime DEFAULT NULL COMMENT ‘创建时间’,\n customer_is_deleted int(11) DEFAULT NULL COMMENT ‘是否删除’,\n customer_address varchar(255) DEFAULT NULL COMMENT ’ 联系地址 ',\n customer_delete_time datetime DEFAULT NULL COMMENT ‘删除时间’,\n customer_state int(11) DEFAULT NULL COMMENT ‘状态’,\n PRIMARY KEY (customer_id) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT=‘客户信息’)\ngithub.com/pingcap/dm/pkg/terror.(*Error).Delegate\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/terror/terror.go:267\ngithub.com/pingcap/dm/pkg/parser.Parse\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/parser/common.go:42\ngithub.com/pingcap/dm/syncer.(*Syncer).parseDDLSQL\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/ddl.go:67\ngithub.com/pingcap/dm/syncer.(*Syncer).handleQueryEvent\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:1545\ngithub.com/pingcap/dm/syncer.(*Syncer).Run\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:1292\ngithub.com/pingcap/dm/syncer.(*Syncer).Process\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:590\ngithub.com/pingcap/dm/syncer.(*Syncer).Resume\n\t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:2287\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337”,

此类问题貌似也比较多了,在 message 中也有提示,

如果不需要可以忽略,如果需要请更改 gbk 为 utf8 或者 utfmb4

怎么操作呢


alter table 可以自行搜索。

我的意思是怎么改 改模板 还是运行一下这个sql

在 task 添加 filter rule ,或者在 mysql 中对 gbk 进行修改。上面已经回复了

你这个回复的模棱两可,还不如不说
人家提问的是dm同步因为这个现象终止同步了,需要具体的方法立刻把同步恢复。
而不是什么任务加过滤就行了,这种敷衍的回答。

请问哪里不理解,可提出来讨论下哈,

解决已经有给出,(修改上游 mysql 编码为 utf8/mb4)

或者

添加过滤,看同步需求。

能具体点吗。这样回答等于0.

asktug 有很多类似的解答, 可自行搜索下,配置 dm 前请先阅读文档, 如果有不明白的地方可随时提问,有兴趣可以学习下, 可以联系我们: