2

I did upgrade the MySQL server from 5.5 to 5.6

I am trying to take dump for a table like this

 mysqldump -uroot -p dba admin > D:\admin.sql

But it gets following error

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

edit:

mysqldump verison is 5.5.30.

1
  • 3
    I suspect you updated your server but forgot to update the clients. What is the version of mysqldump? Commented May 16, 2013 at 7:37

1 Answer 1

2

Some information can be found in SET Syntax and this bug.

The SET statement assigns values to different types of variables that affect the operation of the server or your client. Older versions of MySQL employed SET OPTION, but this syntax is deprecated in favor of SET without OPTION.

How to fix it

  • If the problem happens when you are creating the dump (your case): Upgrade you MySQL client tools to the same version of your MySQL server (in your case, 5.6)

  • If the problem happens when you are restoring the dump: At the beginning of the file, you have some SET OPTION statements; edit your dump, and change all instances of SET OPTION to SET SESSION like described here

1
  • and from where? I can't find it for windows mysql 5.6... Commented Mar 26, 2018 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.