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'm trying to set up Web Sharing... phpinfo() shows MySQL is installed, but I can't find it. Terminal says "command not found" when I try mysql.

I have no idea what I'm doing, or even if this question makes sense.

share|improve this question
I've found this guide on installing MySQL (et al.) to the best of the bunch (and I've followed a few of them over the years): Just stop at Wordpress if you don't want it. The rest is quick, painless, and dead simple. – user10355 Dec 23 '11 at 3:59
@cksum Thanks, I installed it and Sequel Pro now works and what not. But when I try mysql [anything] in Terminal, I just get bash: mysql: command not found. Do I have to do something else to enable that? Or, uh, be in a certain directory? I've tried the apache directory & the directory that houses the socket. – Toph Dec 27 '11 at 0:09
OK, I'm guessing it's a $PATH problem, and in any case I guess you can circumvent it by specifying a full path for the command. Total beginner in all things here. Working on it. :) – Toph Dec 27 '11 at 10:23
@Toph Edit the file /etc/paths.d/mysql with root priviliges (it probably doesn't exist yet) and put "/usr/local/mysql/bin" as content. – Gerry Dec 28 '11 at 1:12
Thanks Gerry. [padding so my comment is long enough, ha] – Toph Dec 28 '11 at 9:57
up vote 5 down vote accepted

MySQL is not installed by default, even though the included PHP is compiled with MySQL support. Check out this guide for MySQL installation.

share|improve this answer
@Toph. See also which is the list of open-source software that is preinstalled on Mac OS X. As you can see, MySQL is not there, while there are PostgreSQL and SQLite, with the latter only in Mac OS X client version (= not in server version). – ignis Jan 19 '12 at 22:22
@ignis There is no such thing as a SQLite server :) – Gerry Jan 20 '12 at 8:47
Yeah, what I meant is "in Mac OS X client version (= not in Mac OS X server version)". – ignis Jan 20 '12 at 22:01

Try opening the terminal, and typing locate mysql.

If you've never used locate before, it will index your drive first; in which case you might need to "sudo locate" and wait five minutes before re-trying.

For the documentation, type man locate and man locate.updatedb.

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.