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 | ...
- 12-22-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 33
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
- 12-22-2009 #2Linux 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
- 12-23-2009 #3Just Joined!
- Join Date
- Dec 2009
- Posts
- 33
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!
- 12-23-2009 #4
i find it best to use absolute paths only when dealing with symbolic links, it usually eliminates problems like these.
- 12-23-2009 #5Just 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.
- 12-23-2009 #6Linux 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:
and that should work without problems.Code:$ cd /usr/local $ sudo ln -sf mysql-5.1.41-linux-i686-glib23 mysql
EOF


Reply With Quote