zsh:找不到命令:mysql [英] zsh: command not found: mysql
问题描述
尝试将MySQL用于Rails应用程序,并从dev.mysql.com下载了它.
Trying to use MySQL for rails app and downloaded it from dev.mysql.com.
如果我继续在终端中执行以下命令,则在成功安装软件包并看到从首选项"窗格启动和停止服务器的选项后,
After successfully installing the package and seeing the option to start and stop the server from Preference Pane, if I go ahead and execute following command in my terminal
mysql --version
我最终遇到错误-
zsh: command not found: mysql
我一直在寻找此错误,并且了解到这与我的 $ PATH
变量有关,如果通过 echo $ PATH
显示该值,我会关注输出-
I've been looking for this error and understand that this has something to do with my $PATH
variable and if display the value by echo $PATH
I get following output -
/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/aniruddhabarapatre1/.rvm/gems/ruby-2.2.1/bin:/Users/aniruddhabarapatre1/.rvm/gems/ruby-2.2.1@global/bin:/Users/aniruddhabarapatre1/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/Users/aniruddhabarapatre1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/opt/ImageMagick/bin:/usr/local/MacGPG2/bin:/Users/aniruddhabarapatre1/.rvm/bin
如何解决此错误以启动并运行Mysql.
How do I resolve this error to get Mysql up and running.
推荐答案
在我的配置和 $ PATH
变量中,这应该是一个问题.我遵循了 mysql onmac 教程来解决此问题.
This was supposed to be a problem within my configuration and $PATH
variable. I followed mysql on mactutorial to resolve this.
在我的终端中,通过转到 vi〜/.zshrc
来打开配置.位于 export PATH ="..."
的行,并在其后附加:/usr/local/mysql/bin
.
In my terminal opened up configuration by going to vi ~/.zshrc
. Located line for export PATH="..."
and appended :/usr/local/mysql/bin
to it.
以上步骤解决了我的问题.
Above procedure resolved my issue.
这篇关于zsh:找不到命令:mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!