Find the answer to your Linux question:
Results 1 to 6 of 6
I was setting up a soft link in linux. Here were the steps I followed: > groupadd mysql > useradd -g mysql mysql > cd /usr/local > gunzip /home/Tim/Download/mysql.....gz | ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33

    Talking bash: cd: mysql: no such file or directory

    I was setting up a soft link in linux. Here were the steps I followed:

    > groupadd mysql
    > useradd -g mysql mysql
    > cd /usr/local
    > gunzip /home/Tim/Download/mysql.....gz | tar xvf -
    > ln -s /usr/local/mysql.... mysql

    I can see the mysql folder in the /usr/local folder. I could even set permissions on it by doing the following:

    > chown -R mysql .
    > chgrp -R mysql .

    However, when I try to cd mysql into the mysql soft link, I am told that there is not such file or directory. It is colored red in the file list with a black background when I do a ls - l.

    Any ideas as to why I cannot cd into mysql ?
    > cd mysql

  2. #2
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    A red-colored entry on a terminal usually means a broken symbolic link (unless you have a different color schema) ...

    A broken symlink is due to the bad relative path... what command did you use exactly to create the link?
    EOF

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33

    Cool Commands I used

    This is from the "install-binary" file that was in the mysql download from the mysql site.

    The command was:

    ln -s /usr/local/mysql-5.1.41-linux-i686-glib23 mysql

    I also tried

    ln -s /usr/local/mysql-5.1.41-lilnux-i686-glib23 ./mysql

    Both of them left the red colored link.

    What was strange was that I could do chgrp on the soft link and there was no error.

    Anyways, I just found that I can install mysql straight from Fedora. I did not know that. So, my issue has been solved in an indirect way. It still would be nice to know what I did incorrectly for the future however.

    Thanks for your help!

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i find it best to use absolute paths only when dealing with symbolic links, it usually eliminates problems like these.

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33
    That makes sense. I guess I should have used more than one brain cell instead of copying line by line out of the instructions.

  6. #6
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    Absolute paths are not always the best solution, specially when you want to move packages or complete folders into other locations (this is not the case)

    Anyway, an alternate solution:

    Code:
    $ cd /usr/local
    $ sudo ln -sf mysql-5.1.41-linux-i686-glib23 mysql
    and that should work without problems.
    EOF

Posting Permissions

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