使用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)
解决方法:查询是否mysqldump版本问题,
mysqldump -V
查询如果mysqldump版本与现在用的mysql版本不一样,直接使用全路径,或到现在版本的mysql /bin文件夹下运行mysqldump即可,
例如:/user/data/mysql-5.7/bin/mysqldump -u root -p ;
或者:cd d:/mysql-5.7 ;
d: ;
mysqldump -u root -p;