# Basic: lost mysql command line after install

**URL:** <https://www.ruby-forum.com/t/basic-lost-mysql-command-line-after-install/92014>\
**Category:** Rails\
**Created:** [April 14, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/basic-lost-mysql-command-line-after-install/92014 "2007-04-14T14:52:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wanzie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/58956e/32.png) [@Wanzie](https://www.ruby-forum.com/u/Wanzie)\
**Post date:** [April 14, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/basic-lost-mysql-command-line-after-install/92014/1 "2007-04-14T14:52:24Z")

</div>

I’ve searched the archives and went through the FAQ’s and install  
HOWTO’s.

But after following the current (4/11/07) install guide on Dan’s  
Hivelogic page,

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

successfully, through every step. I’ve gotten no errors mentioned in  
this page.

And installed mysql as noted which upgraded mysql to 5.0 for the  
powerpc.

Here is my config as noted by the Ruby Welcome Aboard page:

Ruby version 1.8.6 (powerpc-darwin8.9.0)  
RubyGems version 0.9.2  
Rails version 1.2.3  
Active Record version 1.15.3  
Action Pack version 1.13.3  
Action Web Service version 1.2.3  
Action Mailer version 1.3.3  
Active Support version 1.4.2  
Application root /Users/sam/testapp  
Environment development  
Database adapter mysql

I had trouble with Dan’s page because my .bash\_login would not find  
the new Ruby. As you can see above I have overcome it and find MySQL  
in  
/usr/local/mysql-standard-5.0.15-osx10.3-powerpc/bin/mysql\_config

But I cannot run mysql from the command line:  
slim:/usr/local/mysql/bin sam$ mysql  
-bash: mysql: command not found

Here is echo $PATH  
/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin

This is pretty basic, but I’ve not wrapped my head around .bashrc, but  
it appears that mysql should be found by the command line.

I’ve started up another terminal window to access mysql.

This is pretty basic, but perhaps some kind soul will take pity on me.  
I’m trying to update the password, which I expect to do from the  
command line, thanx, sam

---

<div class="post-metadata">

**Author:** ![Wanzie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/58956e/32.png) [@Wanzie](https://www.ruby-forum.com/u/Wanzie)\
**Post date:** [April 14, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/basic-lost-mysql-command-line-after-install/92014/2 "2007-04-14T23:37:58Z")

</div>

Wanzie wrote:

> Action Web Service version 1.2.3
> 
> I’ve started up another terminal window to access mysql.
> 
> This is pretty basic, but perhaps some kind soul will take pity on me.  
> I’m trying to update the password, which I expect to do from the  
> command line, thanx, sam

For security reasons, by default, executables in your current directory  
need to be run by prefixing a “./” (no quotes) in front of the program  
name as in:

./mysql

“.” is the current directory so “./” is the “path” to a file in the  
current directory. You have to put the “/” in there otherwise the shell  
thinks you are trying to access a dot file like your .bashrc.

This is to prevent somebody from, for example, installing a “hacked”  
version of ls on your machine and sticking it in your home directory so  
that any time you typed “ls” in there you would be running the hacked  
version instead of the version out of /bin.

You can override this behavior by sticking “.” in your path statement.  
However that’s not recommended for non-root accounts, in general, and  
you should never do that for the root account.

As a helpful hint you can type "which " as in:

which mysql

to show you where the program can be found using your current PATH  
setting. If it doesn’t find anything the program is not in your PATH.

–  
Michael W.
