getdave/grunt-deployments

/bin/sh: mysql: command not found

thatgibbyguy opened this issue · 5 comments

I'm using AMPPS as my local mysql and apache server and now trying to use this package to sync my local db with the remote dbs.

I can connect with no error to the dbs locally and remotely, but when trying to dump or import locally I get

/bin/sh: mysql: command not found
/bin/sh: mysqldump: command not found

Surely there's something simple I'm missing.

I believe you don't have the AMPPS MySQL package in your PATH. You would have to do something along the lines of

export PATH=$PATH:/Applications/AMPPS/mysql/bin

With Dave's answer I am able to solve this, but it was a little bit more nuanced than that. What I did was open my bash profile

 nano ~/.bash_profile

and enter the following:

 export PATH=/Applications/AMPPS/mysql/bin:$PATH

This technically should be the same thing, but for some reason my environment was not accepting it. So that's a good fallback.

Considering I'm likely not the only person using AMPPS or MAMPS or anything else, it may be a good idea to mention this in the read me. (My apologies in advance if I just glossed over them).

@thatgibbyguy Thank you very much for taking the time to post your solution. I'd love to see a pull request for an edit to the README to include this.

Perhaps a "Troubleshooting" section? Please ensure all pull requests are into the "develop" branch.

I'm having the same issue but I'm using Vagrant/Virtualbox. Can someone help! I've been searching for a solution for 2 days and can't find anything.

@sharpmachine I don't use Vagrant at the moment so I'm not going to be much help here.