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:

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:


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

  • $PATH , mistake asking the question
    – joseluisbz
    Jun 17, 2015 at 2:55

1 Answer 1


First part of this question refers to some how to, which is NOT making program available from everywhere -- it is making the program available from that particular init script, which is the correct solution for such task.

Second part lists the correct solution to make it available from everywhere. If you see manual pages for bash(1), you can see the difference in description:

    The systemwide initialization file, executed for login shells
    The individual per-interactive-shell startup file

So the difference is

  • when the file is loaded: shell startup OR login
  • if it is available for the specific user OR for all users

The difference profile.d version is only that you write it in other file, but I think you can make up that it has the same meaning as putting it into /etc/profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.