View Single Post

   
  #4 (permalink)  
Old 02-20-2008, 07:28 AM
Laurenz Albe
 
Posts: n/a
Default Re: Path Environment Variable

Murphy <m@urphy.com> wrote:
>>> The MySQL manual states the following command should be issued:
>>>
>>> setenv PATH ${PATH}:/usr/local/mysql/bin

>>
>> That is correct if and only if you (or MySQL) use it in a csh shell.
>> On other shells the following will work:
>>
>> PATH=${PATH}:/usr/local/mysql/bin
>> export PATH

>
> csh shell ?... I use it under KDE in the "Shell" windows as SU


Hopefully (and probably) this is not a C shell.
Look at the output of 'ps' and you should know.

> I'm guessing "export PATH" displays the current value of the PATH
> environment variable however when I issue this command nothing is
> displayed, I would have expected some std values to be set for PATH or is
> the default PATH value blank under Slackware/Linux ?


From your response it is obvious that you know very little about
environment variables and shells in general.
That is ok, but you should read up on these things as they are ubiquitous
in Linux.

The shell is the command interpreter that runs inside your
KDE window. There are several, among them bash, ksh and csh.

If you start a program (e.g. MySQL), it inherits all environment variables.
Type 'setenv' in csh and 'export' else to get a list of all environment
variables.
In bsh-type shells you have to 'export' a variable to add it to the
environment.
These variables typically modify the behaviour of a program (PATH is
the search path for executables).

You can use 'echo $PATH' to display the current value of PATH.

It seems like you are trying to start MySQL as user 'root'.
I don't know if that is correct; read the documentation.
Never use root when you can avoid it.

Some pointers for further reading (apart form a web search):
'man bash', section ENVIRONMENT; the first paragraph of the PARAMETERS
section; and particularly the 'export' entry in the SHELL BUILTIN
COMMANDS section.

Yours,
Laurenz Albe
Reply With Quote