vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have just uninstalled and reinstalled MySQL Part of the installation required the directory to be added to the PATH environment variable. Being new to linux I would appreciate confirmation of the following command as the last thing I want to do is screw up the existing path and have to recreate it. The MySQL manual states the following command should be issued: setenv PATH ${PATH}:/usr/local/mysql/bin The directory referenced in the command above is correct. -- Thanks Murph |
| |||
| 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 Yours, Laurenz Albe |
| |||
| Laurenz Albe wrote: > 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 > > Yours, > Laurenz Albe Thanks Laurenz for the prompt reply, csh shell ?... I use it under KDE in the "Shell" windows as SU 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 ? -- Thanks Murph |
| |||
| 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 |
| |||
| Laurenz Albe <albe@culturallnospam.com> wrote: > 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 Another good source for further reading is "UNIX In A Nutshell" from O'Reilly. Good for sh/bash/ksh/csh shells, and is shorter than the bash man page! -------------------------------------------- John Bleichert - syborg@earthlink.net "Conclamatum est, poculatum est" |
| |||
| On Wed, 06 Apr 2005 11:26:39 +0000, Murphy wrote: > I have just uninstalled and reinstalled MySQL > > Part of the installation required the directory to be added to the PATH > environment variable. > > setenv PATH ${PATH}:/usr/local/mysql/bin > > The directory referenced in the command above is correct. You might want to add to the PATH the way Slackware packages do it. They put files in /etc/profiles.d which are run by the login scripts. For example, the tetex package adds files tetex.sh (which is used if you shell is bash) and tetex.csh (for csh). In the file tetex.sh is #!/bin/sh # Add PATH and MANPATH for teTeX: PATH="$PATH:/usr/share/texmf/bin" MANPATH="$MANPATH:/usr/share/texmf/man" You could manually add a similar file for MySQL. Mike |
| ||||
| Mike Denhoff wrote: > On Wed, 06 Apr 2005 11:26:39 +0000, Murphy wrote: > >> I have just uninstalled and reinstalled MySQL >> >> Part of the installation required the directory to be added to the PATH >> environment variable. >> >> setenv PATH ${PATH}:/usr/local/mysql/bin >> >> The directory referenced in the command above is correct. > > You might want to add to the PATH the way Slackware packages do it. They > put files in /etc/profiles.d which are run by the login scripts. For > example, the tetex package adds files tetex.sh (which is used if you shell > is bash) and tetex.csh (for csh). In the file tetex.sh is > > #!/bin/sh > # Add PATH and MANPATH for teTeX: > PATH="$PATH:/usr/share/texmf/bin" > MANPATH="$MANPATH:/usr/share/texmf/man" > > You could manually add a similar file for MySQL. > > Mike Is this the preferred method ? -- Thanks Murph |