从数据库导出表时出现mysqldump错误

时间:2013-05-28 06:35:24

标签: mysql database export

任何人都可以告诉我为什么会收到此错误

  

您的SQL语法有错误;检查与MySQL服务器版本对应的手册,以便在'mysqldump -p --user = root database_name utilities>附近使用正确的语法。 utilities.sql'

就此mysqldump -p --user=root database_name utilities > utilities.sql;

我尝试在反引号中保留数据库名称,表名。似乎没什么用。

1 个答案:

答案 0 :(得分:0)

mysqldump应该从mysql命令的正常命令提示符/ shell 而不是运行,而不是在其中的mysql提示符下运行。

ubuntu-vm:~$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.31-0ubuntu0.13.04.1 (Ubuntu)

mysql> exit
Bye

ubuntu-vm:~$ mysqldump -help
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
ic@ubuntu-vm:~$