【发布时间】:2016-03-17 21:04:03
【问题描述】:
我正在使用 Mysql Work bench(6.3) 将数据库从 MS Sql server(2008) 迁移到 Mysql。它在“批量数据传输”期间出错,并出现以下警告。这只发生在 (varchar, char) 之类的列类型中。当我尝试使用所有“int”列的表时,没有问题。这是我尝试迁移带有列 (Name(char),age(int),Type(varchar)) 的“Boy”表时得到的日志
> `[WRN][ copytable]: 20 characters could not be converted to UTF-8 from column Name during copy
[WRN][ copytable]: 24 characters could not be converted to UTF-8 from column Type during copy
[INF][ copytable]: Statement execution failed: Data too long for column 'Name' at row 1:
INSERT INTO `Test`.`Boy` (`Name`, `Age`, `Type`) VALUES ('John \0 `Test`.`Boy` (`Name',10,'Type is Lien\0\0\0\0�\�7\0\0\0\0\0\0\0\0\0\0\0\0\0\0d\0\0defperformance_schemasession_variablessession_variables\rVariable_name\rVARIABLE_NAME\0@\0\0\0�\0\0\0]\0\0defperformance_schemasession_variablesse')`
MSsql 中的排序规则在 MySQL 中是 Latin1 和 UTF8。
此外,将表数据导出到平面文件并将其导入 Mysql 工作(但这是表到表而不是批量传输)..
【问题讨论】:
-
插入查询看起来很奇怪。为什么小约翰尼的名字中似乎嵌入了表/字段名称?
-
即工作台生成的插入语句。不知道为什么它会这样创建..
-
好吧,有些东西导致数据损坏。