my error was: export cause db error, not import cause error.
MySQL version: 5.7.12 and my table defined as:
CREATE TABLE `process_ext_info` (
`id` bigint(20) NOT NULL COMMENT 'key',
`msg_info` longtext CHARACTER SET utf8 NOT NULL COMMENT 'task para',
`schdTaskType` int(11) GENERATED ALWAYS AS (json_extract(`msg_info`,'$.extInfo.schdTaskType')) VIRTUAL COMMENT 'task type',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='task para info'
I use this to backup my db:
mydumper -h 10.0.0.1 -u admin -p 123456 --no-locks -G -E -R --regex '^(processor-test).*' -o /bak/processor-test
while command finished success, my app begin report error from insert sql:
<#2126615b> c.m.c.j.e.MysqlDataTruncation: Data truncation: Cannot create a JSON value from a string with CHARACTER SET 'binary'.
but my app didn't publish for long time.
then I droped and recreate the 2 field: msg_info and schdTaskType,
the error stoped and my app auto back to normal.
did mydumper changed config of source db? how could I fix it? thanks.