开发者

mysql not in my PATH for some reason

I've installed m开发者_如何学编程ysql 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.


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.


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


To one of your init files (such as /home/username/.bash_profile) add a line like:

export PATH=/path/to/mysql_folder:$PATH
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜