分类: MySQL

mysqldump备份报错

在使用mysqldump备份数据库的时候报如下错误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)
经排查发现是数据库版本问题、安装的是mysql5.6 、执行该命令是mysql5.5遗留下来的二进制文件、验证如下
[root@bogon backup]# which mysqldump
/usr/bin/mysqldump
最后找到解决办法、用新安装的mysql绝对路径来实现备份
/usr/local/mysql/bin/mysqldump mysqldump --user=root --socket=/usr/local/mysql/mysql.sock -P3307 -p zhongjian_jbpm > /data/back/zhongjian_jbpm_20170703.sql

相关文章

发表新评论