Start a program without adding the search path

Discussion in 'Mac OS X Lion (10.7)' started by Narien, Jan 24, 2012.

  1. Narien macrumors member

    Joined:
    Jul 24, 2011
    #1
    Hi, I need to use sql (more specifically mysql) and have installed it on my mac and everything works, however, in order to start the program i need to type /usr/local/mysql/bin/mysql (and then all the mysql settings) in order to start it.
    I would like to remove the path and only type mysql in the terminal in order to start it.

    Any advice on how to do this would be greatly appreciated.
     
  2. thundersteele macrumors 68030

    Joined:
    Oct 19, 2011
    Location:
    Switzerland
    #2
    you need to add /usr/local/mysql/bin to the PATH variable.

    In your home directory, modify (or create if it doesn't exist) the file .bash_profile (notice the leading dot!). Add the following lines:

    Code:
    export PATH="/usr/local/mysql/bin:${PATH}"
     
  3. Narien thread starter macrumors member

    Joined:
    Jul 24, 2011
    #3
    Super great, it worked like a charm, thanks a ton :D
     

Share This Page