[笔记] MySql Workbench 导出表结构和数据报错 m…
2018-06-17 22:49:51来源:未知 阅读 ()
下午使用MySql Workbench导出数据库表结构,设置完导出选项后执行导出,报如下错误:
16:22:40 Dumping nacweixindb (tb_app) Running: mysqldump.exe --defaults-file="c:\users\admini~1\appdata\local\temp\tmpswfutq.cnf" --delayed-insert=FALSE
--host=localhost --protocol=tcp --user=root --port=3306 --default-character-set=utf8
--single-transaction=TRUE --skip-triggers "test_db" mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE' Operation failed with exitcode 7 16:22:41 Export of C:\Users\Administrator\Documents\dumps\Dump20160720-2.sql has finished with 1 errors
多次执行导出操作无果,于是开始google,终于到mysql bug list中找到
Bug #71811 Workbench can't create a Single Transaction dump
解决方案:
1、找到Workbench安装目录,打开文件夹C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules;
2、在modules文件夹中找到python文件wb_admin_export_options.py;
3、注释第29行代码,如下:
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; version 2 of the # License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA export_options = { # "Tables":{ # "no-create-info":["Do not write CREATE TABLE statements that re-create each dumped table.","FALSE"], # "skip-triggers":["Do not dump triggers", "FALSE"] # }, # "Databases":{ # "add-drop-database":["Add a DROP DATABASE statement before each CREATE DATABASE statement.","FALSE"], # "no-create-db":["This option suppresses the CREATE DATABASE statements.","FALSE"] # }, "Inserts":{ "extended-insert":["Use multiple-row INSERT syntax that include several VALUES lists.","TRUE"], "delayed-insert":["Write INSERT DELAYED statements rather than INSERT statements.","FALSE", "BOOL", ("5.0.0", "5.7.0")], # "add-locks":["Surround each table dump with LOCK TABLES and UNLOCK TABLES statements.","TRUE"], "replace":["Write REPLACE statements rather than INSERT statements.","FALSE"], "insert-ignore":["Write INSERT IGNORE statements rather than INSERT statements.","FALSE"], "complete-insert":["Use complete INSERT statements that include column names.","FALSE"] }, "SQL":{ "create-options":["Include all MySQL-specific table options in CREATE TABLE statements.","TRUE"], "quote-names":["Quote identifiers within backtick characters.","TRUE"], "allow-keywords":["Allow creation of column names that are keywords.","FALSE"] }, "Other":{
4、保存文件, 重启Workbench即可正常导出数据库库。
原文地址:
https://bugs.mysql.com/bug.php?id=71811
http://www.serveradminblog.com/2015/12/unable-to-export-database-in-mysql-workbench/
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- MySQL replace函数怎么替换字符串语句 2020-03-09
- PHP访问MySQL查询超时怎么办 2020-03-09
- mysql登录时闪退 2020-02-27
- MySQL出现1067错误号 2020-02-27
- mysql7.x如何单独安装mysql 2020-02-27
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash