Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin.

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

Also, if it's showing the

/usr/local/mysql/bin 

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 stackoverflow.com Nov 4 '12 at 2:14

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

add comment

1 Answer

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
add comment

Your Answer

 
discard

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.