Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL 5.6.5-m8 dump failure

We work with MySQL 5.6.5-m8 dev version.
When we tried to dump the database we got the following error:

user@ubuntu-11:~$ mysqldump -u root -p my_schema > dump.sql
Enter password:
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)

Can anyone advice on the problem?

like image 893
user1479191 Avatar asked Jun 25 '12 06:06

user1479191


2 Answers

MySQL 5.6 discontinued and removed support for SET OPTION syntax, but even the newest mysqldump 5.5.30 (at the time of writing) still generates SET OPTION. In other words, mysqldump 5.5 can't dump from MySQL 5.6 servers.

See: http://bugs.mysql.com/bug.php?id=67507

The original question might have been an interim problem with 5.6.5-m8, but I thought people who find this question could use the information.

like image 110
kenn Avatar answered Oct 20 '22 08:10

kenn


I had this problem. It turns out the mysqldump client I was using was several versions behind the server and was using an outmoded syntax. Check to see if you've got older binaries that are earlier in your path - maybe in /usr/bin/ - and look for newer ones in the same location as the currently executing mysql binary - possibly /usr/local/mysql.

like image 39
Ralph Dosser Avatar answered Oct 20 '22 09:10

Ralph Dosser