Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com May 16 '13 at 7:24

This question came from our site for professional and enthusiast programmers.

1  
I suspect you updated your server but forgot to update the clients. What is the version of mysqldump? –  altmannmarcelo May 16 '13 at 7:37

2 Answers 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:

if the problem happen when you are creating the dump(your case): upgrade you MySQL client tools to the same version of your MySQL server, in this case, 5.6

If the problem happen when you are restoring the dump: in 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

share|improve this answer

Add space in between -uroot to -u root and no gap in password -p dba to -pdba

mysqldump -u %mysqluser% -p%mysqlpassword%
share|improve this answer
    
mysqldump -u root -p dba admin > D:\admin.sql In this, dba is not passowrd, it is db-name and admin is a table_name. No need to give space between between u and username. It's not mandatory. Actually it is not my problem. –  dsatya May 16 '13 at 6:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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