SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    0 Post(s)
    0 Thread(s)

    Am I missing something or is UNIX comletely retarded ? …

    Email :

    “If I can do it then it can’t be done ! …”.

    Hi Everybody :

    I’m trying to get the installation & setup instructions instructions for Mac OSX in Patrick Lenz’s book “Build Your Own Ruby on Rails Web Applications” to work.

    I’m currently stuck on trying to connect to the MySQL database.

    At this point in time I’m trying to add ““/usr/local/mysql/bin/”” to the environment path.

    If I type in :

    echo $PATH

    I get back :


    I assume here that this means that the paths my system will search when looking for a command are the following :


    Now, I would like to add “/usr/local/mysql/bin/” to this list.

    So, apparently, I have to do the following :

    export PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin/:/usr/local/mysql/bin"

    If I do that and I then type in :

    echo $PATH

    I get back :


    So, it looks to me like I now have “/usr/local/mysql/bin” added to my environment path.

    Now, things start to get a little weird.

    If I close the Terminal window and open up another Terminal window and then type in :

    echo $PATH

    I get back :


    In other words, the “/usr/local/mysql/bin” path that I just added in the last Terminal window session is now missing from the environment path. In other words, it looks like the system has just dropped the pathname “/usr/local/mysql/bin” that I added the last time I used the Terminal window.


    I would think the default behavior would be to save the items appended to the environment path between sessions. Otherwise, I’m just going to have to keep adding the same environment path crap every time I want to use a Terminal window.

    In other words, if someone could explain to me how I can alter/append to the environment path and have that change made permanent. I would really appreciate it.

    I’m also curious as to why the default behavior for altering the environment path is to discard all environment path changes made between sessions.

    I mean, really, do the people who develop and support unix has stock in companies who treat carpal tunnel syndrome ?

    OK, let’s try your other suggestion; i.e. : mysql -u root

    This is, of course, bearing in mind that my environment path now has “/usr/local/mysql/bin” appended to it.

    If anyone can explain to me what I’m doing wrong I would really appreciate it.

    I’d like to thank anyone and everyone for any help, advice, answers, solutions or suggestions you could send my way.

    Thank you !

    Comme toujours, here is my contact information :

    1. Email :
    2. Phone : 718-777-7731

    The easiest times to reach me are in the mornings before 11:00 AM or in the evening after about 7:00 PM.

    All the best & talk to you soon … Simon.

  2. #2
    SitePoint Evangelist gollux's Avatar
    Join Date
    Feb 2005
    Oregon, USA
    0 Post(s)
    0 Thread(s)
    You're missing something here. You have only set the path in the current running terminal process. Firing up another terminal doesn't cause the new terminal to inherit the path from the previous running one. You also probably find that it's transient and disappears when you've closed all your terminal screens.

    To get it to be a permanent feature, you will have to find and edit your shell's rc file. It's in your home folder on most Unix/Linux systems and is named .bashrc if you are using the bash shell.

    On Mac OSX, /etc/profile and /etc/bashrc are system-wide and effect all users. Back them up before messing with them. ~/.bash_profile and ~/.bashrc are specific to each user and are used to add personal settings to the environment.

    BTW, insulting Unix by referring to it as being retarded often causes hard core Unixheads to give you the RTFM response. ;^)
    Released under the Fiasco Labs Digital Damnation Copywright,
    it's yours to make whatever the 7734 you want with it.

    (c) 2005 Fiasco Labs All Wrongs Reserved


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts