mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1'
2015-12-29 15:42 abce 阅读(2772) 评论(0) 编辑 收藏 举报源码安装的mysql数据库,在执行mysqldump的时候报错:
# mysqldump -u root -p --all-databases > dbdump.db 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命令,发现路径与源码安装配置的路径不一致:
# which mysqldump /usr/bin/mysqldump
原来系统还有其他版本的mysql:
# rpm -qa | grep -i mysql mysql-5.1.66-2.el6_3.x86_64 mysql-libs-5.1.66-2.el6_3.x86_64
卸载老的rpm包即可:
# rpm -e mysql-5.1.66-2.el6_3.x86_64