1829615 Members
2077 Online
109992 Solutions
New Discussion

Re: How to add new PATH

 
marco_186
Advisor

How to add new PATH

dear all,
i installed mysql but i want to add the path of it /usr/local/mysql/bin to run mysql
how i can add it??
Best Regards
7 REPLIES 7
Arunvijai_4
Honored Contributor

Re: How to add new PATH

Just do,
# export PATH=$PATH:/usr/local/mysql/bin:/usr/local/mysql/sbin

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RAC_1
Honored Contributor

Re: How to add new PATH

export PATH=$PATH:/usr/local/mysql/bin:.
There is no substitute to HARDWORK
Robert-Jan Goossens
Honored Contributor

Re: How to add new PATH

Hi,

Check your /etc/profile or your $HOME/.profile and add the /usr/local/mysql/bin to your PATH.

Regards,
Robert-Jan
Devender Khatana
Honored Contributor

Re: How to add new PATH

Hi,

You can add it by export command but put it in .profile of that user at the end of PATH and /etc/profile if you wish to enable this for all users.

PATH=xxx,yyy,zzzzz,/usr/local/mysql

HTH,
Devender
Impossible itself mentions "I m possible"
Muthukumar_5
Honored Contributor

Re: How to add new PATH

Just add that path into /etc/PATH file. It will be read out automatically with /etc/profile for every user login.

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to add new PATH

If you want to specifically add to some users then,

go to their profile in $HOME/.profile and put like,

export PATH=$PATH:/usr/local/mysql/bin

or simply in /etc/profile check username as,

if [[ $USER = "test" ]]
then
export PATH=$PATH:/usr/local/mysql/bin
fi

Note: Don't use like, export PATH=/usr/local/mysql/bin. It will loose your default PATH settings.

hth.
Easy to suggest when don't know about the problem!
Morcos
Super Advisor

Re: How to add new PATH

PATH=$PATH:/usr/local/mysql/bin
export

ziad