Pages

Thursday, 13 February 2014

Using Mysql from the Terminal in OSX with MAMP

If you're comfortable dealing with Mysql from a command line like linux users would be,  you'll find it a bit frustrating to realize that MAMP on OSX doesn't by default give you global access to the mysql binary when you launch terminal.    On a vanilla install the default location of the mysql executable lives here:

/Applications/MAMP/Library/bin/mysql

Now that we know where it lives lets set up a global way to access it by creating a symbolic link of it into /usr/local/bin

sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/local/bin/mysql

now you'll have access to mysql from any terminal location

You can do the same procedure for mysqldump as well.


No comments:

Post a Comment