View Full Version : Installing MySQL broke sudo? Please help!

Feb 7, 2009, 06:45 AM
Caveat: I am, by no means, a Unix geek. I'm all about web programming; doing stuff to my own machine is literally a different language, so I'm not surprised if I caused whatever the problem is. :(

That said: I was trying to install a development copy of WordPress on my MBP using these directions (http://www.tech-recipes.com/rx/2757/leopard_how_to_install_wordpress/), which start you off with installing MySQL.

I downloaded & installed MySQL. The next step was turning MySQL on, and that's when things went wonky. Every sudo command (including stuff like "sudo ls") results in "command not found."

A search turned up another thread in which the op was asked to do "which sudo" and "echo $PATH". I got "command not found" for the first, and for the second I got...

Unfortunately I have no earthly clue what that might mean. :rolleyes: I did try turning MySQL on via the prefpane, so I don't know if that could've broken something? Or if my inept attempts to get PHP running a few months ago (which eventually were successful, but not without a good bit of mucking about) could be at the root of the problem?

As I said, this is all Greek to me, so while any help is appreciated, help given in short syllables is appreciated more. :)

Feb 7, 2009, 08:40 AM
Well, both sudo and which are supposed to be in /usr/bin, which is in your PATH.

What happens if you type

cd /usr/bin

in Terminal?

What if you then type


Do you see sudo and which ?

Feb 8, 2009, 12:56 PM
Yup, they're both there. What does that tell us?

Feb 8, 2009, 01:10 PM
What does ls -la /usr/bin/sudo give you? You should see this:

$ ls -la /usr/bin/sudo
-r-s--x--x 1 root wheel 211232 Sep 23 2007 /usr/bin/sudo

This might be one thing where repairing permissions actually fixes something. If sudo is there but you don't have permission to run it, you'll get "command not found"

Also, tell us what you get on typing "groups" - you should at least be in the staff group.