Reputation: 28349
I've installed mysql on several macs and on one of them mysql is not in the path. If I export it it shows up in the path correctly, but upon reboot, disappears. What should I do to get the machine to keep it in the path and what are the machines that DO have it in their path doing differently?
Any thoughts appreciated.
Upvotes: 1
Views: 998
Reputation: 4043
Check the /etc/profile
file on the macs it's working on. The path file should be defined there, which would be for all users. The ~/.bash_profile
mentioned is for an individual user.
You should see something similar to the previously mentioned
export PATH=/path/to/mysql_folder:$PATH
in this file, though it may be a bit buried. If you don't see PATH defined here, try /etc/environment
. Failing this, I'm not sure where else OS X would define the path variable, but being a Unix system, there is a common file read by all profiles where it sets it.
Once you find it, compare the definition on the machines it works on to the one it doesn't, and edit accordingly. If it looks the same, then something's amiss, and you should let us know.
Upvotes: 2
Reputation: 1353
To one of your init files (such as /home/username/.bash_profile) add a line like:
export PATH=/path/to/mysql_folder:$PATH
Upvotes: 1
Reputation: 60065
if it is linux you have to add this export to your profile script. if windows edit PATH in My Computer | Properties | Edit environmental variables
Upvotes: 1