macos -bash:command not found 解决方法

来源:互联网 发布:aspera上传数据至sra 编辑:程序博客网 时间:2024/05/12 02:30

macos -bash:command not found 解决方法

第一次装完mysql没有任何问题,美滋滋,但是第二次打开就没那么简单了,即使是进到了usr/local/mysql/bin目录下,mysql命令仍然是command not found。
网上很多解决方法用in -s 添加快捷方式这种方法,亲身体验后并不好使。

主要解决方法还是要在bash_profile里面增加mysql环境变量(路径);
解决步骤如下:
1、修改 ~/.bash_profile 文件,添加:

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

2、下次启动时:source ~/.bash_profile

搞定~


原创粉丝点击