解决MysqlWorkbench Export Data时报

  • 来源:网络
  • 更新日期:2022-02-18

摘要:问题MysqlWorkbench7.0之后的版本使用exportdata时会遇到这个错误12Running:/Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump--defaults-file ="/var/folders/x

问题MysqlWorkbench7.0之后的版本使用exportdata时会遇到这个错误12Running:/Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump--defaults-file="/var/folders/xl/s140j_d96n5djybp3rvh3nt80000gp/T/tmpn6fxeU/extraparams.cnf"--set-gtid-purged=OFF--delayed-insert=FALSE--host=121.40.157.75--protocol=tcp--user=root--port=3306--default-character-set=utf8--skip-triggers"matchbox_test"mysqldump:[ERROR]unknownvariable'delayed-insert=FALSE'Operationfailedwithexitcode713:19:01Exportof/Users/jason/Documents/Dump20151116.sqlhasfinishedwith1errors123456789原因我们看错误报告显示这个变量'delayed-insert=FALSE'不被识别,workbench默认配置里会开启这个变量并且默认值是false。如果我们用不到这个变量可以更改配置文件,注释掉这个变量来解决123解决步骤

找到配置文件目录:__InstallPath__/modules

打开python格式的输出配置文件:wb_admin_export_options.py

找到所在行:"delayed-insert":["Write INSERT DELAYED statements rather than ...

在行开头插入#号注释改行

保存文件,重启Workbench

配置文件所在位置windowsWorkbench的安装目录如:C:\\ProgramFiles\\MySQL\\MySQLWorkbench6.3CE\\modules12MacApplications->MYSQLWorkbench.app/Contents/Resources/plugins.Note:在应用上右击选择ShowPackagecontents进入应用目录12Ubuntu/usr/lib/mysql-workbench/modules/wb_admin_export_options.py1