Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fmaldonadov

macrumors newbie
Original poster
May 10, 2009
3
0
Hi guys,

I am new on mac os and newer dealing with command line. I've been installing mysql on my Leopard OS and i've noticed some strange behavior with terminal. When i try to login throught comman line i go to installation folder and type mysql -u root. Terminal prompts "Command not found" althought mysql comman is right there. Others commands are "missing" as well like updatedb. When i type echo $shell empty line is returned. When i type echo $PATH i get /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

So, right now i don't know if my terminal is working properly or not.

Any suggestion? Thanks you very much
 
Your terminal is working fine. $shell is not an environment variable, $SHELL is (notice the case!). Mac OS X does not have the updatedb command, instead it uses
Code:
/usr/libexec/locate.updatedb
As for the MySQL issue, it simply is not in your PATH variable (which is correct for an unmodified install). If you are in the current path of the executable, just type
Code:
./mysql -u root
The ./ tells the shell to look in the current directory. IIRC, the standard MySQL install path is /usr/local/mysql/bin so you could also just edit your PATH value in either your ~/.bash_profile or ~/.bashrc file.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.