This is listed in my .bash_profile

PATH="/usr/local/mysql/bin:/Applications/MAMP/Library/bin:$PATH"
export PATH

After applying those changes with ". .bash_profile", "which mysql" only outputs

/usr/local/mysql/bin

How do i get mysql to also look at /Applications/MAMP/... ?

Thanks in advance.

有帮助吗?

解决方案

What is happening here is that mysql/bin is listed before the MAMP bin folder. The path is being evaluated from left to right, meaning that because which found mysql in the mysql/bin folder it is returning that one, without ever processing the other directories.

If you want the mysql binary to be found from the MAMP binary folder, then switch the order of your PATH to PATH="/Applications/MAMP/Library/bin:/usr/local/mysql/bin:$PATH"

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top