Installing MySQL broke sudo? Please help!

Discussion in 'Mac Programming' started by cleo, Feb 7, 2009.

  1. cleo macrumors 65816


    Jan 21, 2002
    Tampa Bay Area, FL, USA
    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, 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. :)
  2. LPZ macrumors 65816

    Jul 11, 2006
    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 ?
  3. cleo thread starter macrumors 65816


    Jan 21, 2002
    Tampa Bay Area, FL, USA
    Yup, they're both there. What does that tell us?
  4. plinden macrumors 68040


    Apr 8, 2004
    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.

Share This Page