Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm was trying to change the path for mysql so I can merely call mysql in Terminal to start working with my databases.

However, although I edited my ~/.profile and inserted PATH=/usr/local/mysql/bin:$PATH in there, I still had no luck with calling mysql directly.

Now later on, I deleted everything in the ~/.profile and ~/.bash_profile files.

Yet when I call ECHO $PATH, it shows


Why could this be happening when I removed everything from my ~/.profile and ~/.bash_profile?

Also, if it's showing the


in my path, why am I still unable to get into MySQL by typing mysql into the Terminal prompt?

Also how can someone set up MySQL to be accessed via Mac OSX Terminal instead of through XAMPP (that's how I got mySQL).

Help would be greatly appreciated. Someone should really make a semi-decent MySQL manual too...the online documentation doesn't help much at all.

share|improve this question

migrated from Nov 4 '12 at 2:14

This question came from our site for professional and enthusiast programmers.

You should find out where XAMPP installed the MySQL executable files. It might be /Applications/xampp/xamppfiles/bin; in that case you should use that instead of /usr/local/mysql/bin. Otherwise, what you did is correct!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.