basic question -linux path..(/usr/bin, /usr/local/bin)
Paul Howarth
paul at city-fan.org
Tue Mar 29 13:03:15 UTC 2005
bruce wrote:
> how do i set my environment path? when i try to run mysql (foo>mysql -u
> root -p) i get an err, stating that the mysql isn't in the '/usr/local/bin'
> dir. however, the mysql is in the '/usr/bin' dir. i would have thought that
> this dir would have been searched....
>
> when i do a 'which mysql', it points to the '/usr/bin/mysql'.
>
> if i run '/usr/bin/mysql' mysql works. if i simply run 'mysql' it complains
> that it can't find the '/usr/local/bin/mysql'.
>
> any ideas as to what's going on, or what i should change to simply point to
> the '/usr/bin' for mysql? i'm not quite sure if i even need the
> '/usr/local/bin' mysql files...
A standard Fedora installation does not put *anything* in
/usr/local/bin, so if there's anything there then presumably you put it
there.
If you type:
echo $PATH
it will show you the list of directories searched, in order, when you
type a command name without a "/" in it. You must have a "mysql" command
in one of the directories listed before /usr/bin in your PATH.
So what you need to do is to figure out what is that's on your system in
addition to the system-supplied version of mysql and decide which of the
two you actually want to use. If you don't want the one in
/usr/local/bin, get rid of it.
Paul.
More information about the fedora-list
mailing list