Installing MySQL broke sudo? Please help!

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

  1. macrumors 65816

    cleo

    Joined:
    Jan 21, 2002
    Location:
    Florida, USA
    #1
    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...
    ”/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin”

    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

    Joined:
    Jul 11, 2006
    #2
    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

    ls

    Do you see sudo and which ?
     
  3. thread starter macrumors 65816

    cleo

    Joined:
    Jan 21, 2002
    Location:
    Florida, USA
    #3
    Yup, they're both there. What does that tell us?
     
  4. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #4
    What does ls -la /usr/bin/sudo give you? You should see this:
    Code:
    $ 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