MySQL Workbench:从SQL Anywhere迁移到MySQL

时间:2016-03-17 13:58:21

标签: mysql-workbench sqlanywhere

我正在尝试将一些数据从SQL Anywhere 16数据库迁移到MySQL中,以将数据转换为可行的格式。我正在关注this tutorial

在迁移过程中,我遇到以下错误。 Reverse engineer selected schemas包含以下日志消息:

Starting...    
Connect to source DBMS...    
- Connecting...    
Connect to source DBMS done    
Reverse engineer selected schemas....    
Reverse engineering [dbname] from [dbname]    
- Reverse engineering catalog information    
Traceback (most recent call last):    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 489, in reverseEngineer    
    return SQLAnywhereReverseEngineering.reverseEngineer(connection, catalog_name, schemata_list, context)    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 169, in reverseEngineer    
    catalog = super(SQLAnywhereReverseEngineering, cls).reverseEngineer(connection, '', schemata_list, context)    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_generic_re_grt.py", line 237, in reverseEngineer    
    catalog = cls.reverseEngineerCatalog(connection, catalog_name)    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_generic_re_grt.py", line 388, in reverseEngineerCatalog    
    cls.reverseEngineerUserDatatypes(connection, catalog)    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 41, in wrapped_method    
    res = method(cls, connection, *args)    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 192, in reverseEngineerUserDatatypes    
    if cls.serverVersion().majorNumber < 12:    
    TypeError: serverVersion() takes exactly 2 arguments (1 given)    

Traceback (most recent call last):    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work    
    self.func()    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\migration_schema_selection.py", line 175, in task_reveng    
    self.main.plan.migrationSource.reverseEngineer()    
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\migration.py", line 369, in reverseEngineer    
    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)    
    SystemError: TypeError("serverVersion() takes exactly 2 arguments (1 given)"): error calling Python module function DbSQLAnywhereRE.reverseEngineer    
ERROR: Reverse engineer selected schemas: TypeError("serverVersion() takes exactly 2 arguments (1 given)"): error calling Python module function DbSQLAnywhereRE.reverseEngineer    
Failed

这似乎是Python模块本身的一个错误,所以我完全不知道如何修复它。

1 个答案:

答案 0 :(得分:1)

确实,您在迁移向导中发现了一个错误。请填写http://bugs.mysql.com的错误报告。在此期间,您可以通过在文本编辑器中打开文件C:\ Program Files \ MySQL \ MySQL Workbench 6.3 CE \ modules \ db_sqlanywhere_re_grt.py来解决此问题,转到第192行并更改行:
if cls.serverVersion()。majorNumber&lt; 12:

if cls.serverVersion(connection).majorNumber&lt; 12:
然后再次保存文件并运行迁移向导。小心编辑,这是python文件,因此识别中的每个空间都很重要。