转储文件MySQL 5.6.10 [英] Dump File MySQL 5.6.10

查看:68
本文介绍了转储文件MySQL 5.6.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从我的MySQL数据库创建转储文件,但是当我尝试它时,总是会出现此错误

I was trying to create a dump file from my MySQL database, but when I try it always gives me this error

操作失败,退出代码为2

Operation failed with exitcode 2

16:06:07 Dumping proactivetraindb (userstate)

Running: mysqldump.exe --defaults-extra-file="h:\docume~1\anarita\locals~1\temp\tmpde5rwy.cnf"  --user=root --max_allowed_packet=1G --host=localhost --port=3306 --default-character-set=utf8 "proactivetraindb" "userstate"

mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064)

MySQl的版本是5.6.10,而MySQLDump的版本是5.5.16

The version of MySQl is 5.6.10 but the version of MySQLDump is 5.5.16

有人知道如何解决这个问题吗?

Does someone know how to solve this?

推荐答案

如前一个答案所述,但仅作进一步说明:这适用于Windows中的MySQL.

As outlined by a previous answer, but just to clarify further: This is for MySQL in Windows.

在尝试将数据从本地测试服务器上的表中转储时,我遇到了完全相同的问题,根据先前的答案,这就是我的方法.

I was having the exact same issue while trying to dump data out of a table on a local test server, and based on the previous answer, this is how I did it.

  1. 找到您的mysql原始下载文件夹,然后在/bin文件夹中查找,应该有一个mysqldump.exe.
  2. 进入Workbench首选项:Edit -> Preferences -> Administrator -> Path到mysqldump Tool,然后输入找到的mysqldump.exe的路径.
  3. 通过按确定"并重新启动Workbench进行保存.
  4. 打开终端,但在开始菜单(Windows 7)的搜索"区域中键入cmd,找到在步骤1中找到的sql文件夹,并将cd放入bin.它看起来应该像C:\...\bin>.在这里输入mysqldump -t -u [username] -p [database name] [tablename].这应该将数据从[tablename]表转储到Workbench中指定的转储文件夹中.
  1. Find your mysql original download folder, and look in the /bin folder, there should be a mysqldump.exe.
  2. Go into Workbench Preferences: Edit -> Preferences -> Administrator -> Path to mysqldump Tool, and enter in the path to the mysqldump.exe that you found.
  3. Save by pressing "OK" and restarting Workbench.
  4. Open up terminal, but typing in cmd in the Search area of the start menu (Windows 7), and find the sql folder you found in step 1, and cd into bin. It should look like C:\...\bin>. Here, type in mysqldump -t -u [username] -p [database name] [tablename]. This should dump the data from the [tablename] table into the dump folder as designated in Workbench.

希望这会有所帮助!

这篇关于转储文件MySQL 5.6.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆