tags:

views:

130

answers:

3

Right now, if I want to run mysql, I have to do /Applications/MAMP/Library/bin/mysql -u user -ppass... I'd be a happy camper if I could just do mysql -u user -ppass.... Been googling around, but haven't been able to find anything... Have a feeling I'm using dumb search terms, so if anyone here knows how to do this, that'd be awesome...

A: 

It depends what shell you're using. You should be able to add /Applications/MAMP/Library/bin/ to your path:

export PATH=${PATH}:/Applications/MAMP/Library/bin

Mac OS uses bash by default. Just add this line to your .bashrc.

WhirlWind
A: 

Add:

export PATH=$PATH:/Applications/MAMP/Library/bin/

to your ~/.profile

It will take effect next time your profile is initialized (I'm not sure when that is under OS X, it might be when you start your terminal application, it might be when you log in)

David Dorward
A: 

you can either add /Applications/MAMP/Library/bin/ to your bash PATH variable (edit your .bash_profile, find the line with

export PATH=...
and add here the path to MAMP bin folder) , or maybe create an alias with
alias mysql='/Applications/.../bin/mysql'
(also in your .bash_profile).

matei
Yes, this was it...sort of....... I wound up adding the following lines to .bash_loginexport PATH="/usr/local/bin:/usr/local/sbin:/Applications/MAMP/Library/bin:$PATH"alias mysql-start="sudo /Applications/MAMP/Library/bin/mysql.server start"alias mysql-stop="/Applications/MAMP/Library/bin/mysql.server stop"
BigDogsBarking
(Oh, and just in case anyone runs into this... I had to quit out of Terminal completely and relaunch it for it to take effect...)
BigDogsBarking