MYSQL 终端 Mac 命令不起作用“mysql”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10220708/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MYSQL terminal Mac command not working 'mysql'
提问by KBouldin9
I have a hidden file in my home directory called .profile
with the following:
我的主目录中有一个隐藏文件.profile
,其名称如下:
MYSQL_HOME = /usr/local/mysql/bin/mysql
export PATH=$MYSQL_HOME/bin:$PATH
The following command works:
以下命令有效:
$ /usr/local/mysql/bin/mysql
However mysql
does not. How can I change the path to make the command work?
I have MAMP installed, I'm just not sure how to use it. Thanks!
然而mysql
没有。如何更改路径以使命令工作?我安装了 MAMP,只是不知道如何使用它。谢谢!
回答by Felix Fung
I believe the error is in your first line:
我相信错误在你的第一行:
MYSQL_HOME=/usr/local/mysql/bin/mysql
Which should be like this:
应该是这样的:
MYSQL_HOME=/usr/local/mysql