2014-05-11 68 views
1

我正在使用Navicat Premium将我的数据从Postgresql迁移到Mysql。不支持源数据类型[几何]

我在迁移时遇到了一个strang错误。它说由于几何对象不可用,迁移是不可能的。

我在这里粘贴日志..

[Msg] [Dtf] DataTransfer started 
[Msg] [Dtf] Getting tables properties 
[Msg] [Dtf] Getting tables fields 
[Msg] [Dtf] Getting tables constraints 
[Msg] [Dtf] Getting tables indexes 
[Msg] [Dtf] Getting total records count 
[Msg] [Dtf] Drop table: `geom_data` 
[Err] [Dtf] 80120001: Source data type [geometry] not supported 
[Err] [Dtf] Finished - Unsuccessfully 
-------------------------------------------------- 

可能是什么问题..我可以迁移PostgreSQL的空间数据到MySql?任何选择?任何出路?

+0

MySQL没有数据类型“geometry”,也无法创建它。将PostgreSQL中的空间数据迁移到MySQL是一个很大的退步,你确定你需要/想要这个吗? –

+0

您可能需要让Navicat人员添加对PostGIS和MySQL Spatial的支持。目前似乎没有该工具的支持。我个人无法想象为什么你想要,但有时技术要求不是唯一的因素... –

+0

是的,我确实需要它.. 90%的数据是在MySql中,我需要迁移休息10%来自Postgres .. :( – writeToBhuwan

回答

1

该任务可以通过SQLyog's数据迁移向导完成。

SQLYog-->Powertools-->Import External Data-->Start A new Job--> 
  • 是选择Any ODBC Source从单选按钮后
  • 选择File DSN---> Create a New DSN--File Data Source-->PostgreSQL Unicode
  • 单击下一步,save the file anywhere。例如abc.dsn
  • 单击下一步,enter postgresql details并单击Finish
  • Enter the MySql database details你想你的数据复制到。
  • 你准备好了。

希望它有帮助。

注意:如果Postgresql包含几何数据,请确保您使用MyISAM作为MySql中的数据库引擎。拷贝之前也是remove indexing on any geometrical element