bad path in bash

Sundar Nagarajan sundar.personal at gmail.com
Tue Mar 24 07:48:19 UTC 2009


Walton Hoops wrote:
> No, I used the source from the official MySQL page.  I wouldn't think that
> would affect bash's pathing  though.
> 
> That said (and you're going to hit me for this), a restart of the server
> cleared up the problem.  Still strange that it occurred though :-P
> 
> Thanks for the help!
> 

I'm late to the party, but I agree it is interesting to understand why 
this happened in the first place.

Did you uninstall the existing MySQL and in the same shell install from 
source? Could it be that the original MySQL was in /usr/bin/mysql and 
you required a 'rehash' for bash to re-read the locations of commands in 
the path? That does not explain why 'which mysql' returned 
/usr/local/bin/mysql, or does it? Maybe which is an external command 
that is spawned in a new subshell that creates a new hash of the 
locations of commands in the path - and thus finds mysql in /usr/local/bin?






More information about the ubuntu-users mailing list