Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

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 have installed mysql in Mac OS X 10.6.6. However I don't know how to get to the mysql prompt.

Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$ pwd  
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$ mysql  
-bash: mysql: command not found  
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$  

Any thoughts?

share|improve this question
up vote 0 down vote accepted

If you already are in the /usr/local/mysql/bin directory, just launch:


You should consider adding a symbolic link to /usr/local/mysql/bin/mysql to the /usr/bin directory.

share|improve this answer
Not to /usr/bin that should be Apple software only as an upgrade can delete anything in there. Use /usr/local/bin which is already on the path – Mark Feb 22 '11 at 19:24
Or just add /usr/local/mysql/bin to the $PATH. – mipadi Feb 22 '11 at 20:23
Thanks, I am able to log in to mysql, using $ ./mysql. I will add a symbolic link to /usr/local/bin. It will be great if you can assist me in creating the symbolic link or to update the $PATH variable, Thanks. – Sarbbottam Bandyopadhyay Feb 23 '11 at 5:41
Thanks all, I have created a symbolic link for /usr/local/mysql/bin to /usr/local/bin. However there was no bin directory in /usr/local. So, I have created one. $cd /usr/local; mkdir bin; ln -s /usr/local/mysql/bin mysql. Thanks everyone. – Sarbbottam Bandyopadhyay Feb 23 '11 at 8:22
@Sarbbottam Bandyopadhyay: Since your comment is building the correct answer, why wouldn't you write your own one? As rightly noted by Mark, to play within /usr/bin is risky (stay polite my dear :)). Crapwares do it (for example to improve your sudo). – daniel Azuelos Aug 15 '15 at 14:48

An alternative for newbies (and webdevelopers) is MAMP and phpMyAdmin (that comes bundled with MAMP). Maybe worth a thought.

share|improve this answer
Thanks, but I would like to stick to Mac default provided. Apache HTTP server, PHP is configured in my MacBook Pro. The only missing link was MySql. I am able to figure it out, with expert guidance. :) More question will follow soon ... – Sarbbottam Bandyopadhyay Feb 23 '11 at 5:55

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.