Add MYSQL Alias to mac terminal

-bash: mysql: command not found

If you get this error when trying to log into mysql, you probably are missing an alias.

You can setup an alias on mac by entering this command

alias mysql=/usr/local/mysql/bin/mysql

Note that this will only persist during your current session. More likely than not, you will want to add it to your .profile file to make it persist across reboots.

You can edit the .profile with this command

        echo ‘alias mysql=/usr/local/mysql/bin/mysql’ >> ~/.profile

Advertisements

About spuder
spuder is a "super computer" support engineer by day, and tinkerer / hobbyist by night.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: