Dump File MySQL 5.6.10

2019-02-01 16:44发布

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

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)

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

Does someone know how to solve this?

15条回答
2楼-- · 2019-02-01 17:13

If you are on Linux, update mysql-client to latest version. On Ubuntu:

sudo apt-get upgrade mysql-client

did the job for me.

Setting up mysql-client-5.5 (5.5.43-0ubuntu0.12.04.1) ...

Mine got updated to 5.5 and mysqldump now works for me. This is on Amazon RDS with MySQL 5.6.x

查看更多
甜甜的少女心
3楼-- · 2019-02-01 17:15

If you are using Window 10. Your Mysql server would have been installed in C:\Program Files\MySQL directory and rest all components are installed in C:\Program Files (x86)\MySQL. Go to MySql Workbench>Edit>Preferences. A window will open, click the Administrator tab and mention the path of your mysqldump.exe (which is present in C:\Program Files\MySQL). Restart your workbench.

Thanks, Happy coding!!

查看更多
爷、活的狠高调
4楼-- · 2019-02-01 17:16

I had the same error in MySQL Workbench.

  1. Find out where is the mysqldump tools provided by your install of MySQL 5.6. On my mac it was at "usr/local/mysql-5.6.10-osx10.7-x86_64/bin/mysqldump".
  2. Then I set up this path in MySQL Workbench/Preferences/Administrator/Path to mysqldump Tool
  3. Give MySQL Workbench a restart.

It should work.

查看更多
登录 后发表回答