I was reading this link from MySQL: https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-install-linux-binary.html
shell> cp support-files/mysql.server /etc/rc.d/init.d/
shell> chmod +x /etc/rc.d/init.d/mysql.server
shell> chkconfig --add mysql.server
In the mysql.server file the content says:
PATH=$PATH:/usr/local/SomeDir/mysql/bin
export PATH
But checking the $PATH variable the /usr/local/SomeDir/mysql/bin was not added.
Now, I was looking for the proper solution of this.
I found these links:
https://stackoverflow.com/questions/10235125/linux-custom-executable-globally-available
Edit your .bashrc to add the desired directory on the PATH environmental variable. export PATH=/usr/local/google_app_engine/bin:$PATH then, either start new terminal or do, source ~/.bashrc Now try to run the script from anywhere.
How can I make a program executable from everywhere
If you just export PATH=$PATH:. at the command line it will only last for the length of the session though. If you want to change it permanently add export PATH=$PATH:. to your ~/.bashrc file (just at the end is fine).
-
Create a file with the name of mysql.sh at the path /etc/profile.d/ # vi /etc/profile.d/mysql.sh #!/bin/sh PATH=$PATH:/usr/local/mysql/bin export PATH
http://sgdba.blogspot.com/2013/08/install-mysql-56-binary-on-centos-64-64.html
[root@CentOS ~]# echo "export PATH=$PATH:/usr/local/mysql/bin" >>/etc/profile [root@CentOS ~]# source /etc/profile
Question
In CentOS 6.x what is the proper place (path or location) to put this file with instruction?
Comment: Maybe before solutions works, my question is, how MUST put my instructions. My question is about styles...
Thank you