安迪_963

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

在备份mysql数据库时,遇到了此问题:

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 'mysqldump --databases db1 > db1.sql' at line 1

  官方文档的备份和恢复方法地址:https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/mysqldump-sql-format.html

明明按照官方命令执行的,为什么还是报错呢?

stackoverflow 的答案页:

https://stackoverflow.com/questions/19281026/error-106442000-while-trying-to-execute-mysqldump-command

 

简单点说:

shell> mysqldump --databases db1 db2 db3 > dump.sql

  这里的shell指的是cmd环境(win), 而不是mysql的shell环境.

posted on 2018-03-11 18:10  Andy_963  阅读(230)  评论(0编辑  收藏  举报