0

Here 2 similar questions, but they do not address the same exact issue, that I have:

Dump File MySQL 5.6.10

https://dba.stackexchange.com/questions/42321/issue-on-mysqldump-in-mysql5-6

I have Debian 8 jessie (in a vmware as guest with win7 as host). I updated from mysql 5.5 to mysql 5.6 according to this link https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Everything is working fine. I can successfully run this command from ssh agent(putty) - being connected to Debian from windows

mysqldump my_db > my_db.sql -uroot -p

dump file is being created, everything is perfect.

Now, I want to make the same thing from my win7 (so "remotely" connecting to debian's mysql). From win7 cmd I am trying to run

C:\Users\my_user>mysqldump my_db > my_db.sql -h192.168.252.178 -uroot -p

from which I am getting this error

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 MySQ L server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CR EATE=1' at line 1 (1064)

Please, note the following important things

1) In Debian both mysql server and mysql client have version 5.6

2) I can successfully run mysqldump from localhost (of Debian)

3) Mysql remote access is enabled

4) I can successfully connect "remotely" from win7 to debian8 by running mysql -h192.168.252.178 -uroot -p

5) This error appeared only after updating, before that it was working ok

How to solve this error to be able to run mysqldump from remote machine ?

Thanks

Community
  • 1
  • 1
dav
  • 8,931
  • 15
  • 76
  • 140
  • What is the version of `mysqldump` on the Windows machine? – VolenD Jun 17 '15 at 19:27
  • @user3584460 thanks for the comment, on windows the mysql is 5.5, but can it matter ? I just stopped the mysql service on win7 and tried again - it was the same error. – dav Jun 18 '15 at 09:07
  • Well, then it is exactly the same issue as the one described in the second link which you have pasted - http://dba.stackexchange.com/questions/42321/issue-on-mysqldump-in-mysql5-6. It is not possible to use `mysqldump` version 5.5 with MySQL server 5.6. However, this seems to be fixed in MySQL 5.6.14 - http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-14.html (Bug #67507) – VolenD Jun 18 '15 at 09:35
  • I read that answer of course, but saying mysql client is not it meant the mysql client that is installed on debian ? what windows's mysqldump has to do with debian's mysql ? thanks – dav Jun 18 '15 at 10:22
  • You should have equal versions of MySQL server and client in order to avoid problems/bugs. You have `mysqldump` version 5.5 on your Windows machine and MySQL server 5.6 on your Linux machine. So, you should upgrade `mysqldump` (part of MySQL client) on the Windows machine to version 5.6, or try to upgrade MySQL server to 5.6.14, where supposedly the problem is fixed. Note that the MySQL client on the Linux machine does not play any role here. – VolenD Jun 18 '15 at 11:55
  • ok, I thought the window's mysql should not matter, will try that.The bug it looks like is not fixed yet though, cause version is 5.6.24. thanks – dav Jun 18 '15 at 13:55
  • 1
    @user3584460, I just upgraded win7's mysql from 5.5.28 to 5.5.44 and it worked. thank u for ur help. If you would make an answer from the comments I would accept it, i hope i might be helpful to someone. – dav Jun 18 '15 at 15:48

1 Answers1

1

Try this

#vim mysqldump

find SET OPTION and replace the OPTION with 6 spaces

mindon
  • 318
  • 4
  • 13