2016-07-25 76 views
0

bugs.mysql.com中存在两个与此相同错误(12)有关的错误。他们要么没有提供解决方案(#2),要么替代没有解决问题的.py(#1)。MySQL Workbench迁移向导python错误

错误:

File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_mysql_re_grt.py", line 288, in wrap_routine_sql

return "DELIMITER $$\n"+sql

TypeError: cannot concatenate 'str' and 'NoneType' objects

所以说:行"DELIMITER $$\n"+sql产生错误cannot concatenate 'str' and 'NoneType' objects

错误出现在文件db_mysql_re_grt.py的第288行。来自mysql-workbench的github的This is the original .py file

wrap_routine_sql调用来自this other line

sql = result.stringByName("Create Procedure") 
grt.begin_progress_step(0.1 + 0.9 * (i/total), 0.1 + 0.9 * ((i+0.5)/total)) 
grt.modules.MySQLParserServices.parseSQLIntoCatalogSql(context, catalog, wrap_sql(wrap_routine_sql(sql), schema_name), options) 
grt.end_progress_step() 
i += 0.5 
+0

检查'sql'变量。我敢打赌这是'没有'。 –

+0

看起来像'sql'是'None' - 问题是为什么?你能否提取你的数据库的最小子集,该问题可以复制并在此显示? Aleternativly你可以在bugs.mysql.com上填写一个bug报告并私下附加你的db。 –

回答

0

(不完全修复,但另一种方式来规避错误在我自己的问题)

到迁移的替代方法是:转储源文件 - >导入转储到目标数据库。

original info,步骤是:

  • 打开MySQL工作台
  • 开源数据库
  • 服务器 - >数据导出
  • 打开目标DB
  • 创建模式(进口呢不为你创建架构)
  • 服务器 - >数据导入

如果出现错误“Error querying security information” on Data Export,则建议的解决方案here将下载工作台版本6.3.7(并且其工作)。