简体   繁体   English

MYSQL终端Mac命令无法正常工作'mysql'

[英]MYSQL terminal Mac command not working 'mysql'

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. 但是mysql没有。 How can I change the path to make the command work? 如何更改命令的路径? I have MAMP installed, I'm just not sure how to use it. 我安装了MAMP,我只是不确定如何使用它。 Thanks! 谢谢!

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM