项目中有个达梦库需要迁移到mysql中,我使用了达梦的迁移工具进行迁移,在迁移过程中会出现报错情况,就是有一些语句mysql中执行不了,下面我总结了其中一些常见的报错,供大家参考解决:

1、字段类型问题

timestamp改datetime,在达梦数据库中时间类型是timestamp的话,mysql中要改成datetime。

2、You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default

这个错的意思是default不能作为默认值

3、Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

这个错是表中的字段太长了,都要改小一点或者要将这个字段设置成text类型

4、You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '手动

这个错类型是语句有问题,你要手动加一个单引号来解决

5、Column length too big for column 'CONTENT' (max = 255); use BLOB or TEXT instead

这个错也是你要将字段改成text类型

以上是部分错,欢迎补充或者指正,,,,

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐