mysqldump报错Couldn't execute SET OPTION SQLQUOTESHOW_CREATE=1

报错信息及成因
[root@ip-172-31-10-163  /data/httpd/www]
#mysqldump -ushop -hshop.cgtl4vuzfi7i.rds.cn-north-1.amazonaws.com.cn -p shop>shop20170116.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)
经查是mysqldump版本问题,本地运行的mysql server是5.5.27,远程服务器mysql的版本是5.6.27
[root@ip-172-31-10-163  /data/httpd/www]
#mysql -V
mysql  Ver 14.14 Distrib 5.5.27, for Linux (x86_64) using  EditLine wrapper

[root@ip-172-31-10-163  /data/httpd/www]
#mysql -ushop -hshop.cgtl4vuzfi7i.rds.cn-north-1.amazonaws.com.cn -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21186
Server version: 5.6.27-log MySQL Community Server (GPL)
解决方案
用5.6版本的mysqldump覆盖或者指定目录运行即可:
[root@ip-172-31-10-163  /data/httpd/www]# cp /usr/local/mysql/bin/mysqldump /usr/bin/mysqldump
cp:是否覆盖“/usr/bin/mysqldump”? y

评论

评论正在提交中...请稍后
评论提交成功...
  1. #1

    甲子镇百科 (2017-04-09 15:02:45) 沙发
    你的密码泄露了

  2. #2

    Suvan (2017-04-11 08:44:39) 板凳
    客户的内网服务器 给你密码也没用。。?