5

I have a hidden file in my home directory called .profile with the following:

MYSQL_HOME = /usr/local/mysql/bin/mysql
export PATH=$MYSQL_HOME/bin:$PATH

The following command works:

$ /usr/local/mysql/bin/mysql

However mysql does not. How can I change the path to make the command work? I have MAMP installed, I'm just not sure how to use it. Thanks!

0

1 Answer 1

8

I believe the error is in your first line:

   MYSQL_HOME=/usr/local/mysql/bin/mysql 

Which should be like this:

  MYSQL_HOME=/usr/local/mysql
Sign up to request clarification or add additional context in comments.

3 Comments

And remove the spaces around the =
MYSQL_HOME=/usr/local/mysql/ export PATH=$MYSQL_HOME/bin:$PATH Still doesn't work when i call echo $PATH it gives me: /bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
after editing the .profile exit the shell and re-enter. Alternatively do . <space> ~/.profile to source the changed path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.