database 从 mysql Workbench 6.0 导出数据
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20128223/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Export Data from mysql Workbench 6.0
提问by Rodrigo Araujo
I'm trying to export my database, using MySQL Workbench 6.0 on Windows, to send to my db instance in Amazon RDS, but i'm getting this error:
我正在尝试使用 Windows 上的 MySQL Workbench 6.0 导出我的数据库,以发送到我在 Amazon RDS 中的数据库实例,但出现此错误:
Operation failed with exitcode 7
11:34:40 Dumping clubbin (taxicompanies)
Running: "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqldump.exe"
-defaults-extra- file="c:\users\selene\appdata\local\temp\tmp6o0hno.cnf"
--max_allowed_packet=1G --delayed- insert=FALSE --host=localhost --user=root
--port=3306 --default-character-set=utf8 "clubbin" "taxicompanies"
mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'
Does anybody have any idea that can help me?
有没有人有任何想法可以帮助我?
回答by c4pricorn
mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'
mysqldump: [错误] 未知变量 'delayed-insert=FALSE'
This error occurs on various systems and can be temporarily fixed by:
此错误发生在各种系统上,可以通过以下方式暂时修复:
Going to the appropriate directory depending on the system:
a) Windows:
C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules(32-bit installation on x64 systems:C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules)b) Mac OS X:
Applications/MYSQLWorkbench.app/Contents/Resources/plugins- right click on the app and select Show Package contents to get inside the app (thanks to Bradley Flood)c) Linux Ubuntu:
/usr/lib/mysql-workbench/modules(thanks to Alessandro Lopes)Open file
wb_admin_export_options.pyFind line
"delayed-insert":["Write INSERT DELAYED statements rather than ...Insert
#at the begin of this line to comment it outSave file and restart Workbench.
根据系统转到相应的目录:
A)的Windows:
C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules(32位安装在x64系统:C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules)b) Mac OS X:
Applications/MYSQLWorkbench.app/Contents/Resources/plugins- 右键单击应用程序并选择显示包内容以进入应用程序(感谢Bradley Flood)c) Linux Ubuntu:(
/usr/lib/mysql-workbench/modules感谢Alessandro Lopes)打开文件
wb_admin_export_options.py找线
"delayed-insert":["Write INSERT DELAYED statements rather than ...#在此行的开头插入以将其注释掉保存文件并重新启动 Workbench。
Tested on Windows 7 x64, MySQL 5.6.27 (MyISAM) & Workbench 6.3.5 x64.
在 Windows 7 x64、MySQL 5.6.27 (MyISAM) 和 Workbench 6.3.5 x64 上测试。
Tested on OSX Yosemite 10.10.4, MySQL 5.5.27 (MyISAM), Workbench 6.3.5 build 201 CE x64.
在 OSX Yosemite 10.10.4、MySQL 5.5.27 (MyISAM)、Workbench 6.3.5 build 201 CE x64 上测试。
回答by Olakunle Awotunbo
This worked for me.
这对我有用。
Edit the file C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\wb_admin_export_options.py (make sure you open your editor as administrator)
编辑文件 C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\wb_admin_export_options.py(确保以管理员身份打开编辑器)
find the line:
找到这一行:
delayed-insert":["Write INSERT DELAYED statements rather than INSERT statements.","FALSE", "BOOL", ("5.0.0", "5.7.0")],
延迟插入":["写 INSERT DELAYED 语句而不是 INSERT 语句。","FALSE", "BOOL", ("5.0.0", "5.7.0")],
and put a hash “#” at the beginning of the line so that it looks like this:
并在该行的开头放置一个哈希“#”,使其看起来像这样:
# delayed-insert":["Write INSERT DELAYED statements rather than INSERT statements.","FALSE", "BOOL", ("5.0.0", "5.7.0")],
# delay-insert":["写 INSERT DELAYED 语句而不是 INSERT 语句。","FALSE", "BOOL", ("5.0.0", "5.7.0")],
This will comment the line out so that Workbench won't use this statement.
这将注释掉该行,以便 Workbench 不会使用此语句。
Save and close the file.
保存并关闭文件。
Start Workbench and try again.
启动 Workbench 并重试。
Reference http://dannytsang.co.uk/mysql-workbench-error-code-7/
回答by Alessandro Lopes
On Linux Ubuntu/Mint:
在 Linux Ubuntu/Mint 上:
The config file is located at : /usr/lib/mysql-workbench/modules/wb_admin_export_options.py
配置文件位于:/usr/lib/mysql-workbench/modules/wb_admin_export_options.py
As described by c4pricorn, simply comment the line "delayed-insert":["Write INSERT DELAYED statements rather than...
如 c4pricorn 所述,只需注释“delayed-insert”:[“Write INSERT DELAYED statements 而不是...
And restart workbench.
并重新启动工作台。
回答by gaurav kumar
In CentOS 7,
在 CentOS 7 中,
Open file /usr/lib64/mysql-workbench/modules/wb_admin_export_options.py Find line "delayed-insert":["Write INSERT DELAYED statements rather than ... Insert # at the begin of this line to comment it out Save file and restart Workbench.
打开文件 /usr/lib64/mysql-workbench/modules/wb_admin_export_options.py 查找行 "delayed-insert":["Write INSERT DELAYED statements 而不是 ... 在此行的开头插入 # 以将其注释掉 保存文件并重新启动工作台。
回答by C.Poh
As highlighted at an earlier post, by putting a # at the delayed-insert line in wb_admin_export_options.py does solves the problem.What i like to add is that when i tried to edit it in notepad and Pythonwin,i encountered the admin rights issue.They don't let me save the file after my edit.I finally work around it by editing and saving it in notepad++.One can download it from here https://notepad-plus-plus.org/
正如在较早的帖子中强调的那样,通过在 wb_admin_export_options.py 中的延迟插入行放置一个 # 确实解决了问题。我想补充的是,当我尝试在记事本和 Pythonwin 中编辑它时,我遇到了管理员权限问题。他们不允许我在编辑后保存文件。我最终通过编辑并将其保存在记事本++中来解决它。可以从这里下载它https://notepad-plus-plus.org/
回答by Mike Lischke
Delayed inserts where deprecated in 5.6 and are converted to normal inserts in 5.7 (see also http://dev.mysql.com/doc/refman/5.7/en/insert-delayed.html). I wonder why mysqldump reports an error on this. Regardless, MySQL Workbench must be adjusted to no use delayed-insertfor dumps. Can you please file a bug report at http://bugs.mysql.comto bring this on the agenta for MySQL Workbench?
延迟插入在 5.6 中已弃用,并在 5.7 中转换为正常插入(另请参见http://dev.mysql.com/doc/refman/5.7/en/insert-delayed.html)。我想知道为什么 mysqldump 会报告这个错误。无论如何,必须将 MySQL Workbench 调整为不使用delayed-insert转储。您能否在http://bugs.mysql.com上提交错误报告,以将其引入 MySQL Workbench 的 agenta 中?
回答by Bart
Removing delayed-insert line in wb_admin_export_options.pysolves the problem. You need to get admin rights to modify the file.
去除延迟插入线wb_admin_export_options.py解决了这个问题。您需要获得管理员权限才能修改文件。
Nonetheless consider that your MySQL database might have been not properly upgraded before.
尽管如此,请考虑您的 MySQL 数据库之前可能没有正确升级。
回答by andreA
Be careful on editor: on Win7 64 notepad doesn't work on this modification. Notepad will present a single line, use an editor with crlf.
注意编辑器:在 Win7 64 位记事本上,此修改不起作用。记事本将显示一行,使用带有 crlf 的编辑器。
回答by pinkp
I had this error until I upgraded to the latest version. Currently 8.0.15. That fixed it on my Mac.
在升级到最新版本之前,我遇到了这个错误。目前 8.0.15。这在我的 Mac 上修复了它。

