MySQL mysqldump 命令不起作用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2979464/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 16:12:16  来源:igfitidea点击:

mysqldump command not working?

mysqlmysqldump

提问by Harish Kurup

I am using mysqldump to take backup of my database, but the command is not working.. the command i am using is mysqldump -u root dbname> 'c:\backupdatafolder\backup.sql'i am running this command in MySQL cli but not running,..is there any thing wrong in the command?

我使用mysqldump把我的数据库备份,但该命令没有工作..我现在用的就是命令mysqldump -u root dbname> 'c:\backupdatafolder\backup.sql'我运行在MySQL的CLI命令,但没有运行,..有什么事做错了命令?

回答by bakkal

You are supposed to run that on the command line of your operating system not on the MySQL CLI.

您应该在操作系统的命令行上而不是在 MySQL CLI 上运行它。

cdto the bin folder of MySQL first, something like C:\mysql\binor wherever your MySQL is installed on

cd首先到 MySQL 的 bin 文件夹,例如C:\mysql\bin或安装 MySQL 的任何位置

回答by Ayush Jain

If the mysqldump can not be identified by your CMD prompt (I believe you are using Windows), then you first have to go to the bin folder where this command can be found. In my case, the path is "C:\wamp\bin\mysql\mysql5.5.24\bin", it would be more or less the same path for you. After that open your CMD prompt and go to this path by command "cd C:\wamp\bin\mysql\mysql5.5.24\bin". Now you should run your mysqldump command for taking the backup as you have been trying. Hope this helps!

如果您的 CMD 提示无法识别 mysqldump(我相信您使用的是 Windows),那么您首先必须转到可以找到此命令的 bin 文件夹。在我的情况下,路径是“C:\wamp\bin\mysql\mysql5.5.24\bin”,它对你来说或多或少是相同的路径。之后打开您的 CMD 提示符并通过命令“cd C:\wamp\bin\mysql\mysql5.5.24\bin”转到此路径。现在您应该运行您的 mysqldump 命令来进行备份,因为您一直在尝试。希望这可以帮助!