On 31 Dec 11, at 20:36, Govinda wrote:
>> If you're using MacOS X Server, it should be in /usr/bin, which should be in 
>> your default $PATH, or else you couldn't do ANYTHING, including "ls."
> 
> I have notes somewhere in my stuff about how to get $PATH to include where 
> mysql actually lives, but once I realized what the issue was (in my OP this 
> thread) then I was fine with just using a full path for now.  The convenience 
> of a 'fixed' $PATH will be nice, sooner or later (when I get to it), but for 
> now it is just as well that I let it beat into my head how the CL is actually 
> working (working out the full paths)

You should fix the $PATH, as you'll need it for utilities (such as mysqldump) 
and such.

You need to edit your shell startup file. For bash, it's ".bash_profile" in 
your home directory. Other shells will have their own startup script. My 
.bash_profile includes:

export 
PATH="$HOME/bin:/Developer/Tools:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/sbin"

Do "echo $SHELL" to see which shell you're using.

Do "printenv" to see all your global shell variables, including $SHELL and 
$PATH.

>> What does "locate mysqldump" tell you?
> 
> Govind% locate mysqldump
> 
> WARNING: The locate database (/var/db/locate.database) does not exist.
> To create the database, run the following command:
> 
>  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

[message repeated after running the suggested command]

What that does is tells the system launcher to index your disks in the 
background, so it's no surprise that it would not immediately create a working 
database.

It should have finished by now, and you should now be able to run the locate 
command.

>> How about "echo $PATH"?
> 
> Govind% echo $PATH
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

I don't have the official binary distribution in front of me, but once you get 
"locate" working, you can add the path of your MySQL binaries to the $PATH 
variable by appending it (preceded by a colon) to the $PATH declaration in your 
shell's startup script.

----------------
Do you often think about difficulties, failure and disasters? Do you keep 
thinking about the negative news you have seen on the TV or read in the 
newspapers? Do you see yourself stuck and unable to improve your life or your 
health? Do you frequently think that you do not deserve happiness or money, or 
that it is too difficult to get them? If you do, then you will close your mind, 
see no opportunities, and behave and react in such ways as to repel people and 
opportunities. You let the power of negative thinking rule your life. -- Ramon 
Sasson
:::: Jan Steinman, EcoReality Co-op ::::





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to