mysqldump导出时: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1':
在用mysqldump导出时报如下错误:
[root@localhost ~]# mysqldump -uroot -p -d -R test > test.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.6.13 ,在使用yum安装dbd驱动时自动安装了5.0.9的mysql rpm包:
[root@localhost ~]# mysqldump --version
mysqldump Ver 10.11 Distrib 5.0.95, for RedHat-linux-gnu (x86_64)
[root@localhost ~]# which mysqldump
/usr/bin/mysqldump
用5.6版本的mysqldump覆盖或者指定目录运行即可:
[root@localhost ~]# cp /MysqlData/base/mysql/bin/mysqldump /usr/bin/mysqldump
cp:是否覆盖“/usr/bin/mysqldump”? y
Linux下通过mysqldump备份MySQL数据库成sql文件 http://www.linuxidc.com/Linux/2013-02/79793.htm
Linux中使用mysqldump对MySQL数据库进行定时备份 http://www.linuxidc.com/Linux/2012-03/56063.htm
mysqldump缺失-q参数导致MySQL被oom干掉 http://www.linuxidc.com/Linux/2013-09/90092.htm
mysqldump和LVM逻辑卷快照 http://www.linuxidc.com/Linux/2013-09/90382.htm
MySQL备份方案-->(利用mysqldump以及binlog二进制日志) http://www.linuxidc.com/Linux/2013-09/89975.htm
[MySQL] 用mysqldump制作文本备份 http://www.linuxidc.com/Linux/2013-11/92427.htm
本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-10/108496.htm