mysqldump: command not found XAMPP

转自:http://stackoverflow.com/questions/22786583/mysqldump-command-not-found-xampp

I'm trying to use a script in grunt and node to dump a database. When I run It return me this error:

/bin/sh: mysqldump: command not found

I have already contacted the creator of the script and we have understand that the problem is the configuration of my localhost.

I'm using XAMPP 1.8.2-3 in OSX

How can I use correctly mysqldump

Thanks

shareimprove this question
 
    
it seems you haven't specify your mysqldump binary path in .bashrc or .profile.. other way is: you can also can try to execute ./mysqldump from your mysql/bin directory (can't remember to pinpoint the "exact" path, I hope you know it).. –  Yohanes Khosiawan 许先汉 Apr 1 '14 at 12:59 
    
I added this to my .bashrc /Applications/XAMPP/bin but it doesn't work, inside this directory there is mysqldump @YohanesKhosiawan许先汉 –  WebDesigner Apr 1 '14 at 13:09
    
try to execute: source ~/.bashrc, it's to reload the .bashrc content again.. – Yohanes Khosiawan 许先汉 Apr 1 '14 at 13:10 
    
it works! Great man thank you @YohanesKhosiawan许先汉 –  WebDesigner Apr 1 '14 at 13:15
    
no prob, @WebDesigner.. –  Yohanes Khosiawan 许先汉 Apr 1 '14 at 13:16

Try:

export PATH=$PATH:/Applications/XAMPP/bin
即:
[root@localhost bin]# export PATH=$PATH:/opt/lampp/bin

Then run your script.

So you don't have to do this in the future, check your .profile file in your home directory. There should be a line that starts with export PATH, something like (only an example):

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Just add your XAMPP path to it:

export PATH=/opt/local/bin:/opt/local/sbin:/Applications/XAMPP/bin:$PATH

The different directories are separated by colons only, don't add any whitespace.

posted on 2015-09-12 16:06  ziyi_ang  阅读(517)  评论(0编辑  收藏  举报

导航