laravel 'mysqldump' 未被识别为内部或外部命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31354510/
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
'mysqldump' is not recognized as an internal or external command
提问by RK26
currently im trying to make backup and restore mysql database in my laravel project. I am using this laravel package https://github.com/backup-manager/laravelfor backup package. i already follow the intructions, but when i am trying to backup my local database through command line (php artisan db:backup) in the last question, i got this message.
目前我正在尝试在我的 Laravel 项目中备份和恢复 mysql 数据库。我正在使用这个 laravel 包https://github.com/backup-manager/laravel作为备份包。我已经按照说明进行操作,但是当我在最后一个问题中尝试通过命令行 (php artisan db:backup) 备份我的本地数据库时,我收到了这条消息。
Dumping database and uploading...
[BackupManager\ShellProcessing\ShellProcessFailed]
'mysqldump' is not recognized as an internal or external command,
operable program or batch file.
I already googling it, and already put C:\xampp\mysql\bin to my windows env variables paths, but i still having this issue. if anybody know how to fix this, please tell me, i really appreciate it.
我已经在谷歌上搜索它,并且已经把 C:\xampp\mysql\bin 放到我的 windows env 变量路径中,但我仍然有这个问题。如果有人知道如何解决这个问题,请告诉我,我真的很感激。
Laravel 5.1.x
Laravel 5.1.x
回答by Bhaskar Mohanta
It is because mysqldump.exe is not foundin that location, the right path is given bellow
这是因为在那个位置没有找到mysqldump.exe,下面给出了正确的路径
- Open Command Promptand type this
cd C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin
- 打开命令提示符并输入这个
cd C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin
Press Enter
按 Enter
then type
然后输入
mysqldump.exe
mysqldump.exe
or,
或者,
Directly open this directory "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin" and Press LEFT SHIFT KEY from keyboard and RIGHT CLICK on the Directory Window. then type
直接打开此目录“C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin”,然后按键盘上的 LEFT SHIFT KEY 并在目录窗口上单击鼠标右键。然后输入
mysqldump.exe
mysqldump.exe
It will work 100% correctly
它将 100% 正确工作