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?

2 Answers 2


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.

  • 3
    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
    – mmmmmm
    Commented Feb 22, 2011 at 19:24
  • 2
    Or just add /usr/local/mysql/bin to the $PATH.
    – mipadi
    Commented Feb 22, 2011 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. Commented Feb 23, 2011 at 5:41
  • 1
    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. Commented Feb 23, 2011 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).
    – dan
    Commented Aug 15, 2015 at 14:48

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

  • 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 ... Commented Feb 23, 2011 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .