Terminal strange behavior

Discussion in 'macOS' started by fmaldonadov, May 10, 2009.

  1. fmaldonadov macrumors newbie

    Joined:
    May 10, 2009
    #1
    Hi guys,

    I am new on mac os and newer dealing with command line. I've been installing mysql on my Leopard OS and i've noticed some strange behavior with terminal. When i try to login throught comman line i go to installation folder and type mysql -u root. Terminal prompts "Command not found" althought mysql comman is right there. Others commands are "missing" as well like updatedb. When i type echo $shell empty line is returned. When i type echo $PATH i get /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

    So, right now i don't know if my terminal is working properly or not.

    Any suggestion? Thanks you very much
     
  2. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #2
    Your terminal is working fine. $shell is not an environment variable, $SHELL is (notice the case!). Mac OS X does not have the updatedb command, instead it uses
    Code:
    /usr/libexec/locate.updatedb
    As for the MySQL issue, it simply is not in your PATH variable (which is correct for an unmodified install). If you are in the current path of the executable, just type
    Code:
    ./mysql -u root
    The ./ tells the shell to look in the current directory. IIRC, the standard MySQL install path is /usr/local/mysql/bin so you could also just edit your PATH value in either your ~/.bash_profile or ~/.bashrc file.
     
  3. fmaldonadov thread starter macrumors newbie

    Joined:
    May 10, 2009
    #3
    Thanks a lot. And sorry about my ignorance.

    Best regards
     
  4. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #4
    Not a problem and don't be! You have to start from somewhere.
     

Share This Page