Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dump File MySQL 5.6.10

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?

like image 466
aboliveira Avatar asked Mar 05 '13 15:03

aboliveira


People also ask

What is a dump file in MySQL?

It dumps one or more MySQL databases for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.


1 Answers

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. 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.

Hope this helps!

like image 157
Jason Maelstrom Avatar answered Oct 08 '22 00:10

Jason Maelstrom