Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have installed mysql in mac os x (10.6.6). How ever I dont know how to get in to mysql prompt (newbie).
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$ pwd
/usr/local/mysql/bin Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$ mysql
-bash: mysql: command not found
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$

Any thought???

Thanks, Sarbbottam

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

./mysql

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

share|improve this answer
2  
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
2  
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
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. –  Sarbbottam Bandyopadhyay Feb 23 '11 at 8:22

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

 
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.